● Write TCP client and server that can communicate to each other saying “Hello I am client and My id is 1” and “Hello I am server. Your received id is 1” ● The ID of the client should be only a single digit i.e from 0 to 9 ● Run one client and server on same machine ● Your server should be in running state infinitely and should not terminate after serving one client only. The clients will keep on coming one by one and server will keep on serving them unless terminated intentionally. ● Sample Test Bench – Client1 sends : “Hello I am client and My id is 1” – Client2 sends: “Hello I am client and My id is 2” – Server response on client1: “Hello I am server. Your received id is 1” – Server response on client2: “Hello I am server. Your received id is 2”
(The program should be in cpp)
● Write TCP client and server that can communicate to each other saying
“Hello I am client and My id is 1” and “Hello I am server. Your received id is 1”
● The ID of the client should be only a single digit i.e from 0 to 9
● Run one client and server on same machine
● Your server should be in running state infinitely and should not terminate
after serving one client only. The clients will keep on coming one by one and
server will keep on serving them unless terminated intentionally.
● Sample Test Bench
– Client1 sends : “Hello I am client and My id is 1”
– Client2 sends: “Hello I am client and My id is 2”
– Server response on client1: “Hello I am server. Your received id is 1”
– Server response on client2: “Hello I am server. Your received id is 2”
Trending now
This is a popular solution!
Step by step
Solved in 2 steps