| 31 | #include <utility> |
| 32 | |
| 33 | openhd::TCPServer::TCPServer(const std::string tag, |
| 34 | openhd::TCPServer::Config config, bool debug) |
| 35 | : m_config(config), m_debug(debug) { |
| 36 | m_console = openhd::log::create_or_get(tag); |
| 37 | assert(m_console); |
| 38 | m_accept_thread = |
| 39 | std::make_unique<std::thread>(&TCPServer::loop_accept, this); |
| 40 | m_console->debug("created with {}", m_config.port); |
| 41 | } |
| 42 | |
| 43 | openhd::TCPServer::~TCPServer() { |
| 44 | // debug_if("TCPEndpoint::~TCPEndpoint() begin"); |