A small C++ message/server project containing separate server and client components. The repository provides a server implementation with threading and a lightweight client-side skeleton (logger + example main). This README explains the project layout, how to build and run components, and where to look for sources and tests.
server/— server implementationinclude/— public headers (server, controller, setup, thread-pool, logger, constants)src/andlib/— server sources and compiled librariesbin/— built executables (may containserverandmain)Makefile— build helpertest/— server tests (if any)
client/— client-side example and utilitiesinclude/— client headers (e.g.logger.hpp)lib/— client libs (logger.cpp)src/— example clientmain.cpptests/— client tests (if any)
readme.md— this file
- Linux (development tested on Ubuntu)
- C++ compiler with C++17 support (g++ recommended)
- make (for server)
- pthread (threading support)
Server (recommended):
cd /home/alireza/Desktop/etc/message-app/server
make
# built binaries will be under server/bin or just bin depending on Makefile
# Example run (adjust binary name if needed):
./bin/server
# or
./bin/mainClient (simple example build):
cd /home/alireza/Desktop/etc/message-app/client
mkdir -p bin
g++ -std=c++17 -Iinclude src/main.cpp lib/logger.cpp -o bin/client -pthread
./bin/clientIf a different build system is preferred, add a Makefile or CMakeLists.txt in client/.
- Start the server first. Check
server/binfor the exact executable name and available CLI options (try./bin/server --helpor./bin/main --help). - Run the client binary and point it to the server host/port (client example
main.cppmay contain usage notes).
- Server entry:
server/src/main.cpp - Server core:
server/lib/server-*.cpp,server/include/server.hpp - Message handling:
server/src/message/ - Thread pool and singleton utilities:
server/include/thread-pool.hpp,server/include/singleton.hpp - Logger used by both sides:
*/include/logger.hpp,*/lib/logger.cpp - Client example:
client/src/main.cpp
Both server/test and client/tests folders exist — run or expand test cases as needed. Add a test runner or integrate with your CI.
- Fork, create a feature branch, add tests, and submit a PR.
- Keep interfaces in
include/stable and add changes behind feature flags where appropriate.