Skip to content

SyrekGMR/Python-Chatroom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python-Chatroom

A simple python-based chatroom I made a while back whilst learning Python.
To begin, you must first run server which will run on port 5000 and localhost by default.

python Server.py

Next, run the client specifying the address and port number on which it is to connect.

Python Client.py localhost 5000



The included code is heavily commented, explaining the functionality of each feature within the server and client files. The chatroom client works by establishing a handshake with the server and maintain this connection throughout a while loop.

The server consequently continues to listen for any communications from its connections, this looks at both the handshake verification and any data transmission. Upon receiving any encoded data from a connected client, the server then broadcasts this to all connected clients comprising the chat room, this communication is then displayed on the client's terminal. Any missed handshake between server and client indicates a disconnection in which case the server removes the client from its list of connections and broadcasts a disconnection message.

About

Python based server-client chatroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages