Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING PYTHON 2.7!!! Please include comments I want to understand how everything is working. Programming Assignment 2: Socket Programming In this assignment, you'll write a

USING PYTHON 2.7!!!
Please include comments I want to understand how everything is working. image text in transcribed
Programming Assignment 2: Socket Programming In this assignment, you'll write a server and client program. There are two clients, X and Y (both essentially identical) that will communicate with a server. Clients X and Y will each open a TCP socket to your server and send a message to your server. The message contains the name of the client followed by your name (e.g., "Client X: Alice", "Client Y: Bob). The server will accept connections from both clients and after it has received messages from both X and Y will print their messages and then send an acknowledgment back to your clients The acknowledgment from the server should contain the sequence in which the client messages were received ("X: Alice received before Y: Bob, or Y: Bob received before X: Alice"). After the server sends out this message it should output a message saying- "Sent acknowledgment to both X and Y". Your server can then terminate. Once your clients receive the message from the server, they should print the message that they sent to the server, followed by the reply received from the server. The following figure explains the problem Server Client Y Client X Client X X: Alice Your program should print out the messages sent by the chent at both the client and server and vice versa for messages sent by the server

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions