add server/client to namespace commons

This commit is contained in:
2022-04-26 18:54:18 +02:00
parent 32fdc8f891
commit 2bebce2ba4
5 changed files with 19 additions and 3 deletions

View File

@@ -14,15 +14,16 @@ void init_spdlog() {
void run_client() {
boost::asio::io_context io_context;
spdlog::info("Running client...");
client s(io_context, boost::asio::ip::make_address("0.0.0.0"), 9000, 0);
commons::client s(io_context, boost::asio::ip::make_address("0.0.0.0"), 9000,
0);
s.init();
io_context.run();
}
void run_server() {
boost::asio::io_context io_context;
spdlog::info("Running client...");
server s(io_context, 9000);
spdlog::info("Running server...");
commons::server s(io_context, 9000);
io_context.run();
}