| 220 | static const char* addr = "255.255.255.255"; |
| 221 | #endif |
| 222 | LayerTree::SocketAgent::SocketAgent() { |
| 223 | #ifndef __EMSCRIPTEN__ |
| 224 | listenSocket = std::make_shared<ListenSocket>(); |
| 225 | for (uint16_t i = 0; i < BroadcastCount; i++) { |
| 226 | broadcasts[i] = std::make_shared<UDPBroadcast>(); |
| 227 | isUDPOpened = isUDPOpened && broadcasts[i]->openConnect(addr, BroadcastPort + i); |
| 228 | } |
| 229 | |
| 230 | #endif |
| 231 | epoch = Clock::Now(); |
| 232 | spawnWorkTread(); |
| 233 | } |
| 234 | |
| 235 | LayerTree::SocketAgent::~SocketAgent() { |
| 236 | stopFlag.store(true, std::memory_order_release); |
nothing calls this directly
no test coverage detected