Skip to content

Sample asynchronous protocol-based TCP client and server apps using C++ and Boost::Asio

License

Notifications You must be signed in to change notification settings

iamazeem/TcpClientServerApp

Repository files navigation

TcpClientServerApp

ci License: MIT

Sample asynchronous protocol-based TCP client and server apps using C++ and Boost::Asio

sequenceDiagram
    autonumber
    participant client
    participant server
    client-->>server: connect
    server->>client: welcome
    client->>server: command
    activate server
    note right of server: execute
    server->>client: output
    deactivate server
    client->>server: exit
    server--xclient: disconnect
Loading

Dependencies

Build

git clone --recursive [email protected]:iamazeem/TcpClientServerApp.git
cd TcpClientServerApp
cmake -S . -B build
cmake --build build

The client and server binaries will be generated under build directory:

  • ./build/server/server
  • ./build/client/client

Run

Run server on one terminal:

./build/server/server

Run client on another terminal:

./build/client/client

License

MIT