This project implements a TCP server and TCP client in Python that communicate with each other on localhost using port 5000.
- Python 3.x
- First, start the server:
python server.py- In another terminal, start the client:
python client.py- Start the server in one terminal
- Start the client in another terminal
- In the client, type a message (e.g., "hello server")
- Verify that the server responds with the message in uppercase ("HELLO SERVER")
- With server and client running
- In the client, type "DESCONEXION"
- Verify that:
- The client disconnects and ends its execution
- The server closes the connection with that client but continues running
- The server remains ready for new connections
- Server accepts connections on localhost:5000
- Converts received messages to uppercase
- Properly handles disconnection
- Supports multiple sequential connections
En este proyecto se implementa un servidor y cliente TCP en Python que se comunican entre sí a través de localhost por el puerto 5000.
- Python 3.x
- Inicie el servidor con python o python3 (según aplique):
python server.pyor
python3 server.py- En otra terminal, inicie el cliente con python o python3 (según aplique):
python client.pyor
python3 client.py- Inicie el servidor en una terminal
- Inicie el cliente en otra terminal
- En el cliente, escriba un mensaje (por ejemplo: "hola servidor")
- Verifique que el servidor responda con el mensaje en mayúsculas ("HOLA SERVIDOR")
- Con servidor y cliente en ejecución
- En el cliente, escriba "DESCONEXION"
- Verifique que:
- El cliente se desconecte y termine su ejecución
- El servidor cierre la conexión con el cliente pero siga ejecutándose
- El servidor quede listo para nuevas conexiones
- El servidor acepta conexiones en localhost:5000
- Convierte los mensajes recibidos a mayúsculas
- Maneja la desconexión correctamente
- Soporta múltiples conexiones