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

@@ -8,6 +8,8 @@
#include "boost/bind.hpp"
namespace commons {
class client {
public:
client(boost::asio::io_service& io_service,
@@ -26,3 +28,5 @@ class client {
std::string message_;
unsigned short port_;
};
} // namespace commons

View File

@@ -7,7 +7,10 @@
#include "protocol.hpp"
#include "spdlog/spdlog.h"
namespace commons {
using boost::asio::ip::udp;
using namespace protocol;
class server {
public:
@@ -55,3 +58,5 @@ class server {
enum { max_length = 1024 };
char data_[max_length];
};
} // namespace commons