#server side import socket print ("Server Up") s = socket.socket() port = PA # PA = Port Address s.bind(('', port)) s.listen(1) c, addr = s.accept() print ("Socket Up and running with a connection from Client at ",addr) while True: rcvdData = c.recv(1024).decode() print ("Client:",rcvdData) sendData = input("Server: ") c.send(sendData.encode()) if(sendData == "Bye" or sendData == "bye"): break c.close() #client side import socket print ("Client Up") s = socket.socket() s.connect(('LA', PA)) # LA = loop Address; PA = Port Address while True: str = input("Client: ") s.send(str.encode()); if(str == "Bye" or str == "bye"): break print ("Server:",s.recv(1024).decode()) s.close() By using the code given,create the output of the code between the client side and server side that communicate each other
#server side
import socket
print ("Server Up")
s = socket.socket()
port = PA # PA = Port Address
s.bind(('', port))
s.listen(1)
c, addr = s.accept()
print ("Socket Up and running with a connection from Client at ",addr)
while True:
rcvdData = c.recv(1024).decode()
print ("Client:",rcvdData)
sendData = input("Server: ")
c.send(sendData.encode())
if(sendData == "Bye" or sendData == "bye"):
break
c.close()
#client side
import socket
print ("Client Up")
s = socket.socket()
s.connect(('LA', PA)) # LA = loop Address; PA = Port Address
while True:
str = input("Client: ")
s.send(str.encode());
if(str == "Bye" or str == "bye"):
break
print ("Server:",s.recv(1024).decode())
s.close()
By using the code given,create the output of the code between the client side and server side that communicate each other

Step by step
Solved in 3 steps with 2 images









