Python program for two way communication using socket programming (client-server chat)
File: server.py
File: client.py
Output (Terminal-1)
kodingwindow@kw:~$ python3 server.py Client> b'Hi Server' You> Hello Client Client> b'How are you?' You> Thank You. I am fine. How about you? Client> b'I am good.' You> Bye. Catch you later. Client> b'Okay. Bye' You>
Output (Terminal-2)
kodingwindow@kw:~$ python3 client.py You> Hi Server Server> b'Hello Client' You> How are you? Server> b'Thank You. I am fine. How about you?' You> I am good. Server> b'Bye. Catch you later.' You> Okay. Bye
Advertisement