



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Project 3 Assignment Material Type: Project; Class: Network Application Design; Subject: Electrical & Computer Engineer; University: Virginia Polytechnic Institute And State University; Term: Fall 2007;
Typology: Study Guides, Projects, Research
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Virginia Tech Bradley Department of Electrical and Computer Engineering
The educational objective of this project is to reinforce concepts related to datagram sockets, IP multicast, and peer-to-peer applications. The design and programming objectives of this project are to design, implement, and test a peer-to-peer text chat windowed application based on IP multicast. Specifically, you are to develop an application using IP multicast that allows users to join a group, send text messages to all members of the group, to display text messages from all members of the group, and to leave the group. Notes on design are included in the appendix.
You may work on this project in teams of two students at most. You can work on it individually. You may not share your code with other students or borrow code from other students. You may not discuss your design or code with anyone except the instructor or the TA. You may not help other students in debugging their code. You may not have others help you. Simply stated, you may not discuss or in any way share any aspect of your original work with anyone except the instructor or graduate teaching assistant for this class. If you use libraries or any code developed by others, its use must be properly acknowledged.
You may discuss the details of system calls with other students. You may also discuss the protocol specification and the requirements of this assignment with others. Contact the instructor if you have any questions about the honor code requirements.
Policy regarding plagiarism
The TA will use MOSS to detect software plagiarism. Here is the link to MOSS: http://theory.stanford.edu/~aiken/moss. If a student (or team) is proven to have used code that is not his/hers/theirs, he/she/they will be automatically get an F in this course regardless of how much of the submitted code is not his/hers/theirs and regardless of the source from which they took the code.
You application should support the following operations.
the application might display “[127.0.0.1:5698] Hello!” as its output, where 127.0.0.1:5698 is the endpoint information for the message’s source.
The time-to-live (TTL) value for multicast communication should be 1 or configurable with 1 as the default. The application will need to allow multicast loopback to display its own messages. Multiple instances of the application, all using the same IP group address and destination port number, should be able to run on the same host.
The following constraints apply to the implementation and testing of the application.
Project grades will be based on the following factors as documented in your report and exhibited by your program.
15 points Project report contents, including completeness and quality 75 points Correct operation of the multicast chat application 10 points Implementation of additional features
Note that you can earn at most 90 points out of a maximum of 100 points by implementing the application as a console application. Up to 10 additional points will be awarded for the completion of the features specified below.
6 points The ability to send a unicast message to one of the participants based on the IP address of the participant. This should be done on a one message instance, where the default behavior is sending to the group. After a unicast message is sent, the sending behavior should revert to sending to the group. 4 points Log the chat session to a file. Content should include the address of the sender, the time of arrival, and the message text.
2.1. Windowed TCP Echo Client Example
Note that the windowed TCP echo client has a user interface that is very similar to what is needed for the multicast chat application required for Project 3. Instead of specifying a “Server” and “Port” for the server, the chat application needs to specify an IP multicast group and a destination port. Instead of performing a “Connect” or “Disconnect” operations, the chat application needs to “Join” or “Leave.”
The input window of the TCP echo client can serve as the message input window for the chat application. The output window of the TCP echo client can serve as the message output window for the chat application. “Send” and “Clear” operations can behave the same for both applications.
The File>Exit menu in the TCP echo client provides a way to exit the application.
The TCP echo client application also includes a BackgroundWorker object. The background worker can be used to asynchronously receive multicast messages in a way similar to how the TCP echo client application receives and displays data from the server.
2.2. Multicast Examples
Of course, the TCP echo client example is using TCP instead of UDP and is based on client-server communication instead of peer-to-peer multicast communication. The operation of the chat application as a UDP multicast application can be modeled after the multicast sender and multicast receiver examples. These examples show how to join a multicast group, receive messages from a multicast group, send messages to a multicast group, and leave a multicast group.
It is strongly recommended that your chat application use two different sockets, one for sending and one for receiving. This decouples these two operations and allows the source port numbers to be different for different senders.
2.3 User Interface Examples
Figure 1 shows an example user interface using menu objects for the join, leave, and exit functionality. Text boxes are used for input and a list box is used for output. A combo box is used for the optional functionality of sending a unicast message to a specific user; this allows the user to specify an address directly, or to use one from the list of collected addresses. A button is used to invoke the send operation.
Figure 1: Example UI.