- Docker & Docker Compose - to run using Docker
- Visual Studio 2022 and Python 3 - to run locally
-
Clone / Download this repository.
-
Open Terminal / Command Prompt at the project's root directory and type:
docker-compose build --no-cacheProject's root directory is the folder that contains the
docker-compose.yaml,README.md,.gitignorefiles andTCPClientandTCPServerfolders.-
Running
ServerandClientin separate terminals with real-time outputs and input:Starting
ServerUse previously opened Terminal / Command Prompt and type:
docker compose up tcp-server --no-buildStarting
ClientOpen another Terminal / Command Prompt at the project's root directory and type:
docker-compose run --rm tcp-client -
Running
Clientin single terminal with real-time output and input:Use previously opened Terminal / Command Prompt and type:
docker compose up tcp-server --detach --no-build docker-compose run --rm tcp-client
-
- Clone repository:
git clone https://github.com/nkudry/TCPClientServer.git
- Attaching to an existing running container:
docker attach TCPClient
docker attach TCPServer
- View container logs:
docker logs -f TCPServer
docker logs -f TCPClient
- Clean up the docker compose images and containers:
docker compose down --rmi all
- Clone / Download this repository.
- Open Terminal / Command Prompt at
TCPServerdirectory and type:
python server.py
The server will start on port :54321
- Open
TCPClient.csprojatTCPClientdirectory with Visual Studio 2022 and press Start (F5).