The assignment is done in groups of two students. After the assignment has been accomplished, please demonstrate it to some of the assistants. After the assistant has verified the functionality and the source codes of your implementation, you are free to leave. Before leaving, send your source codes and packet dump file with the group ID and the list of the group members with contact information by email to: email@example.com.
The assistants are available until 18:00, but you can continue after that as well. If you finish your assignment after 18:00, you can demonstrate the functionality next day.
Programming problem: This is the first part of the project of building a video application, although you'll only re-use parts of this project later. The goal of this programming assignment is to (re)-acquaint you with basic unicast socket programming and timer handling, which you will need for the following projects.
poll()functions to receive UDP packets sent to a certain port (e.g. 5000). Upon receiving the packet, your application should return it to the sender, after waiting for 500 ms. The packet contains a text string with a counter, which is incremented on each transmission, e.g., a node that receives a packet with counter value 17 would return one with counter 18.
(host_48)$ pingpong -d 18.104.22.168:5000 -l 5000 (host_47)$ pingpong -d 22.214.171.124:5000 -l 5000if you want the two machines, berlin and chicago, to play ping-poing with each other. To test you program locally, start two instances of the program on the same machine and use different listening ports, as in:
(host)$ pingpong -d 127.0.0.1:5001 -l 5000 (host)$ pingpong -d 127.0.0.1:5000 -l 5001
Back to main page