let' put this client and server to work there are two ways to run these scripts--on either the same machine or two different machines to run the client and the server on the same machinebring up two command-line consoles on your computerstart the server program in oneand run the client repeatedly in the other the server keeps running and responds to requests made each time you run the client script in the other window for instancehere is the text that shows up in the ms-dos console window where 've started the server scriptc:\pp \internet\socketspython echo-server py server connected by ( ' server connected by ( ' server connected by ( ' the output here gives the address (machine ip name and port numberof each connecting client like most serversthis one runs perpetuallylistening for client connection requests this server receives threebut have to show you the client window' text for you to understand what this meansc:\pp \internet\socketspython echo-client py client receivedb'echo=>hello network worldc:\pp \internet\socketspython echo-client py localhost spam spam spam client receivedb'echo=>spamclient receivedb'echo=>spamclient receivedb'echo=>spamc:\pp \internet\socketspython echo-client py localhost shrubbery client receivedb'echo=>shrubberyherei ran the client script three timeswhile the server script kept running in the other window each client connected to the serversent it message of one or more lines of textand read back the server' reply--an echo of each line of text sent from the client and each time client is runa new connection message shows up in the server' window (that' why we got threebecause the server' coded as an infinite loopyou may need to kill it with task manager on windows when you're done testingbecause ctrl- in the server' console window is ignoredother platforms may fare better it' important to notice that client and server are running on the same machine here ( windows pcthe server and client agree on the port numberbut they use the machine names "and localhostrespectivelyto refer to the computer on which they are running in factthere is no internet connection to speak of this is just ipcof the sort we saw in sockets also work well as cross-program communications tools on single machine network scripting