Boost asio is used as network library
Linux operating system and toolchain, tested on Ubuntu
Installed CMake 3.x.x, Git, GCC >= 5 / Clang >= 9, libboost-all-dev >= 1.71
Compiler should support at least C++11, do not use GCC 8.x, this version is buggy.
Check compiler version before you start build configuration
g++ -vAlthough this is not a recommended practice, I have published local configuration scripts, you can find them in the CMake folder. Use them as inspiration or as the default code for your editing and use. Another information can be found in .github/workflows/cmake.yml.
Mandatory
- CMAKE_BUILD_TYPE ... Debug, Release
Optional
- CMAKE_CXX_COMPILER ... use if env CXX is not set
git clone git@github.com:Hexik/asio_async_server.git
cd asio_async_server
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .The client and server binaries will be generated:
./remote_topdaemon server./src/server/serverEchoserver running in console, data dump./src/client/clientsimple client
sudo ./remote_topThis is basic usage
./src/client/client 127.0.0.1 mem cpu./src/client/client 127.0.0.1 mem cpu cpu mem cpu mem cpu cpu & ./src/client/client 127.0.0.1 mem cpu mem cpu cpu cpu mem mem & ./src/client/client 127.0.0.1 a b c d e f && fgsudo pkill remote_topStart server in one terminal
./src/server/serverEchoopen the second terminal and use client app as above
Project is distributed under the Boost Software licence 1.0
- Copyright 2022 © Miroslav Fontan