Async client server chat written on C++ (std::c++17) using boost::asio library.
- to formalize the data exchange, the server may implement an API
- define specific content format
- parse it.
- scheduling system to prioritize incoming requests from clients to accommodate them
- to prevent abuse and maximize availability, the server software may limit the availability to clients (agains DoS attacks)
- encryption should be applied if sensitive information is to be communicated between the client and the server.
TCP protocol will be used.
- CMake 3.16 or higher
- C++17 standard or higher
- boost 1.72.0 or higher for asio
- OpenSSL 1.1.1l
- google test will be downloaded by cmake as external project (see vendor/gtest)
- rapidjson will be downloaded by cmake as external project (see vendor/rapidjson)
...- There is a bash script used to generate all needed information for the server. You shoud run it before building project
cd settings
# provide domain name (server for this case)
# also note, script must be executable
gen-crt.sh server- Notes when using boost.asio Learning notes
- read data from client
- pass read data to server
- broadcast received data to all clients
- timely remove all connections that were closed
- Add safe client disconnection
- Add safe server disconnection
- Fix errors and add multithreading safety:
- can I remove server pointer from the session? - Can't
- reorganize work with buffers.
- make copy of the project and apply cooroutings!
- simple protocol & parser for text messages
- define message structure
- define parser
- one chatroom with several users
- it will broadcast if somebody joined
- it will broadcast if somebody leave
- timeouts with timers for the server to avoid server's abuse
- force to choose username
- add login/logout
- add SSL
- support multithreading for server
- implement some simple GUI for the clients