This is a lightweight, multithreaded chat application built in C++.
It supports both Linux (POSIX sockets) and Windows (Winsock2), allowing multiple clients to connect to a server and exchange messages in real time.
- π§ Client-Server architecture using TCP sockets
- π¨ Colored messages for better readability
- π Multithreaded: separate threads for sending and receiving
- π‘ Works on Linux (
<sys/socket.h>
) and Windows (<winsock2.h>
) - π₯ Supports multiple clients simultaneously
#exit
command to disconnect gracefully
- Run the following:
g++ server.cpp -o server -pthread
g++ client.cpp -o client -pthread
- Open a terminal and run the following(server):
./server
- For client open another terminal and run the following:
./client
- for multiple users repeat step 4.
- Compile with MinGW or MSVC:
g++ client.cpp -o client.exe -lws2_32
- π User authentication (login system)
- π¬ Private messages (DMs)
- π File sharing
- π₯οΈ GUI version (Qt / ImGui)
