Skip to content

alirezaco/cpp-messages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Message App

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.

Project layout

  • server/ — server implementation
    • include/ — public headers (server, controller, setup, thread-pool, logger, constants)
    • src/ and lib/ — server sources and compiled libraries
    • bin/ — built executables (may contain server and main)
    • Makefile — build helper
    • test/ — server tests (if any)
  • client/ — client-side example and utilities
    • include/ — client headers (e.g. logger.hpp)
    • lib/ — client libs (logger.cpp)
    • src/ — example client main.cpp
    • tests/ — client tests (if any)
  • readme.md — this file

Requirements

  • Linux (development tested on Ubuntu)
  • C++ compiler with C++17 support (g++ recommended)
  • make (for server)
  • pthread (threading support)

Build

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/main

Client (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/client

If a different build system is preferred, add a Makefile or CMakeLists.txt in client/.

Running

  • Start the server first. Check server/bin for the exact executable name and available CLI options (try ./bin/server --help or ./bin/main --help).
  • Run the client binary and point it to the server host/port (client example main.cpp may contain usage notes).

Where to look in the code

  • 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

Tests

Both server/test and client/tests folders exist — run or expand test cases as needed. Add a test runner or integrate with your CI.

Contributing

  • Fork, create a feature branch, add tests, and submit a PR.
  • Keep interfaces in include/ stable and add changes behind feature flags where appropriate.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published