Question: Modify the simplex-talk socket program so that it uses UDP as the transport protocol rather than TCP. You will have to change SOCK_STREAM to SOCK_DGRAM

Modify the simplex-talk socket program so that it uses UDP as the transport protocol rather than TCP. You will have to change SOCK_STREAM to SOCK_DGRAM in both client and server. Then, in the server, remove the calls to listen() and accept(), and replace the two nested loops at the end with a single loop that calls recv() with socket s. Finally, see what happens when two such UDP clients simultaneously connect to the same UDP server, and compare this to the TCP behavior.

Step by Step Solution

3.41 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on your question it seems like you want an explanation on how to modify an existing TCPbased clientserver program to use UDP instead and to unde... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Networking Questions!