diff --git a/README.md b/README.md index 5a4deafb..544a7ddb 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,40 @@ Client-server chat applications are versatile tools that facilitate real-time co Client-server chat applications are foundational to real-time communication over networks. They incorporate principles of socket programming, communication protocols, and security mechanisms to provide a seamless user experience. Understanding the basics of client-server chat applications is essential for developers involved in networked application development, as they form the backbone of various collaborative communication systems. As technology evolves, chat applications continue to adapt, incorporating new features and technologies to enhance user interaction and connectivity. +## Program: +Client: +``` +import socket +s=socket.socket() +s.connect(('localhost',5000)) +while True: + msg=input("Client > ") + s.send(msg.encode()) + print("Server > ",s.recv(1024).decode()) +``` +Server: +``` +import socket +s=socket.socket() +s.bind(('localhost',5000)) +s.listen(5) +c,addr=s.accept() +while True: + ClientMessage=c.recv(1024).decode() + print("Client > ",ClientMessage) + msg=input("Server > ") + c.send(msg.encode()) +``` +## Output: +![1](https://github.com/user-attachments/assets/a75af6ad-1ce9-4b9a-a00b-bf094f82b7ac) + ## Result: Thus the study on Client Server Chat Applications has been performed + + + + +