This is a simple chat application implemented in Python using sockets. It allows multiple clients to connect to a server and chat with each other.
- The server listens for incoming connections from clients on a specified IPv4 address and port.
- Each client can send messages to the server, which are then broadcasted to all connected clients.
- Clients can also disconnect from the server by sending the message 'q'.
- Run the server script (
Server.py) on a machine with a publicly accessible IPv4 address. - Run the client script (
Client.py) on multiple machines within the same local area network (LAN). - When prompted, enter your name in the client script to identify yourself.
- Start typing messages in the client script and press Enter to send them to the server. Your messages will be broadcasted to all other connected clients.
- To exit the client script, type 'q' and press Enter.
If you need to change the IPv4 address of the server, follow these steps:
- Open the
Server.pyfile in your text editor. - Locate the
SERVER_HOSTvariable at the top of the file. - Change the value of
SERVER_HOSTto the desired IPv4 address. - Save the file.
- All machines running the client script must be connected to the same local area network (LAN) as the server in order to communicate with each other.
- Make sure that the port specified in the
SERVER_PORTvariable in both the server and client scripts is not blocked by any firewall or network restrictions.