mkdir build
cd build
cmake -G [platform] .. (ex: cmake -G "Visual Studio 15 2017" ..)
bin/test_server.exe
bin/test_client.exe
(test_server.exe must be executed at the first.)
JSON for Modern C++ - To serialize/deserialize
Excute test_server.exe first, then test_client.ext.
There are automatical 8 tests.
- The client sends integer value to the server, then receives the value that sent to the server synchronously.
- The client sends string value to the server, then receives the value that sent to the server synchronously.
- The client sends a certain structure to the server, then receives the structure that sent to the server synchronously.
- The client calls the sum function on the server, then receives the result of the sum function synchronously.
- The client sends integer value to the server, then receives the value that sent to the server asynchronously.
- The client sends string value to the server, then receives the value that sent to the server asynchronously.
- The client sends a certain structure to the server, then receives the structure that sent to the server asynchronously.
- The client calls the reverse function on the server, then receives the result of the reverse function asynchronously.
common.hpp
- There are common definitions and classes for convenience.
server.hpp
- The server deserializes and classifies the serialized data that come from the client.
- The server resends the data that come from the client to verify or calls the custom function that was registered on the server.
client.hpp
- The client sends the serialized data to the server.
- the client receives the data that come from the server, then verifies the retured data.