Welcome to this basic TCP chat application written in C#!
It consists of two console programs working together to send and receive messages over the network.
- ServerApp: A TCP server that listens for client connections and echoes received messages with timestamps.
- ClientApp: A TCP client that connects to the server and sends messages.
- Real-time message exchange via console.
- Exit gracefully by typing
exit.
- .NET 6 SDK or higher
- A command line terminal (PowerShell, CMD, Terminal, etc.)
Ensure you have these two folders:
/ServerApp /ClientApp
Open a terminal, navigate to the ServerApp folder, then run:
cd "path/to/ServerApp"
dotnet runit will write:
Server started. Waiting for a connection...
Open a other terminal, navigate to the ClientApp folder, then run:
cd ClientApp
dotnet runit will write:
Connected to the server!
You:You can now write in the client terminal and it will upload it to the terminal server