/Client-Server-chat

C++ Client-Server chat using sockets

Primary LanguageC++

Client-Server chat

Simple C++ Client-Server chat using sockets.

GitHub code size in bytes Number of lines of code Code language count GitHub top language


Preamble

The purpose of this project is to create Client-Server chat with winsock2.
The concept of this programm is that clients can create chat rooms and communicate within them.


Operations

  • Сlient and server have their own functions and features:
Client Server
Server connection Message forwarding
Server disconnection Logging user actions
Creating rooms Showing warning messages
Removing rooms Showing information messages
Opening existing rooms
Exiting rooms
Showing list of existing rooms
Changing nickname

  • There are several types of messages in the client console, which are identified by their color:
Color Description
Green User messages or commands
White Messages from other users
Blue Information messages from server
Red Warning messages from server

  • And several types of messages in the server console:
Color Description
Green Client connection message
White Forwarding messages between users
Blue Client command information
Red Receiving unrecognized packet from client
Client disconnection
Exceeding connection limit

Examples

  • Let's look at a variety of informational and warning messages from the client side.
    Server on the left, client on the right.

1

2

3

  • Messaging between multiple users.
    Server on the left top.
    First of all user "John" creates room named "1".
    Other users open this room and start chatting with each other.

4