Question: Using the programming language of your choice, write two sets of client-server programs. In one set, the client and the server communicate over TCP,

Using the programming language of your choice, write two sets of client-server programs. In one set, the

Using the programming language of your choice, write two sets of client-server programs. In one set, the client and the server communicate over TCP, while in the other they communicate over UDP. In both sets, the client sends a "hello" message to the server, and the server replies with "back at you". The client then computes and prints the RTT. RTT shall not include the time it takes to construct a packet or extract data from it. You must use sockets directly; you cannot use any frameworks that take care of sending/receiving data for you. a) Attach the source code of your programs and the resulting screenshots for each set. (4 marks) b) How do the RTTs of UDP and TCP compare? Explain why it's so. (2 marks) c) Repeat part b) but instead of sending just one hello and one reply, send 1000 consecutive hello messages with replies. How do they compare now in terms of average/min/max RTTs? (2 marks) If both TCP and UDP servers run simultaneously and use the same port number, won't the clients be mixed up when they contact their corresponding server on that port number? Why? (2 marks) d)

Step by Step Solution

3.42 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Lets start with the code for the TCP clientserver communication TCP Server servertcppy import socket Create a TCP socket serversocket socketsocketsocketAFINET socketSOCKSTREAM Bind the socket to a spe... 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 Network Questions!