feat: defining server interface
This commit is contained in:
parent
b1659108e3
commit
ce2b4e7c7b
3 changed files with 49 additions and 1 deletions
20
modules/you_done_it/ydi_server.cpp
Normal file
20
modules/you_done_it/ydi_server.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "ydi_server.h"
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <thread>
|
||||
#include <zmq.hpp>
|
||||
#include <zmq_addon.hpp>
|
||||
|
||||
namespace ydi::server {
|
||||
struct Service {
|
||||
std::optional<zmq::context_t> context{ std::nullopt };
|
||||
std::optional<zmq::socket_t> socket{ std::nullopt };
|
||||
std::recursive_mutex mtx{};
|
||||
};
|
||||
|
||||
std::optional<Service> service{ std::nullopt };
|
||||
thread_local std::optional<std::thread> receiveThread{ std::nullopt };
|
||||
|
||||
void open(int port) {
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue