Network Chat is a simple console chat application developed on the .NET 6 platform. The project consists of three main components: NetworkLibrary
, UserClient
, and UserServer
. This chat allows users to exchange messages over a network, where the server is responsible for broadcasting messages to all connected clients.
The project is divided into three separate solutions:
-
NetworkLibrary
This is the core library that contains classes for network operations. It handles basic functionality such as network connection, sending, and receiving data. This library is used in both the client and server components. -
UserClient
This is the client-side application that represents a user. Each client connects to the server and can send messages, which are then relayed to all other connected clients. -
UserServer
This is the server-side application responsible for managing connected clients and broadcasting messages. When a client sends a message, the server forwards it to all other clients.
- The Server starts and waits for client connections.
- Clients connect to the server and can begin exchanging messages.
- When a client sends a message, the server receives it and forwards it to all other connected clients.
- Each client receives the message and displays it in the console.
- TCP
- UDP
- Ability to add custom protocols
- .NET SDK
- IDE (e.g., Visual Studio 2022 or JetBrains Rider)
- Clone the repository:
git clone https://github.com/JordanOleg/NetworkChat.git
- Open the solution in your IDE.
- First, run the UserServer project to start the server.
- Then, run one or more instances of UserClient to connect clients to the server.
- Enter a message in the client console, and it will be sent to all other clients via the server.
-
Starting the Server:
cd UserServer dotnet run
The server will start and wait for client connections.
-
Starting a Client:
cd UserClient dotnet run
After connecting to the server, enter a message in the console, and it will be sent to all other clients.
This project is distributed under the MIT License. For more details, see the LICENSE file.
- JordanOleg
GitHub
If you have any questions or suggestions for improving the project, please create an issue or submit a pull request in the repository. I welcome your contributions!