| 33 | }; |
| 34 | |
| 35 | static ServerGuard makeServer(const ConnectionConfig& config = ConnectionConfig()) { |
| 36 | ServerGuard g; |
| 37 | g.ptr = fl::make_unique<NativeHttpServer>(kAnyPort, config); |
| 38 | if (g.ptr->start()) { |
| 39 | g.port = g.ptr->port(); |
| 40 | return g; |
| 41 | } |
| 42 | g.ptr.reset(); |
| 43 | return g; |
| 44 | } |
| 45 | |
| 46 | // Server thread: runs accept + update in background, posts results via atomics/mutex. |
| 47 | // This is the standard net-thread-to-main pattern: a dedicated networking thread |
no test coverage detected