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
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
Get step-by-step solutions from verified subject matter experts
