TWIN server: accept inbound twin connections on TWIN_LISTEN_PORT

Replace the initTwinServer() stub with a real Async::TcpServer that
listens on TWIN_LISTEN_PORT (default 5304). Inbound connections are
held in m_twin_pending_cons with a 10-second hello timeout; on receipt
of a valid MsgTrunkHello with ROLE_TWIN the connection is handed off to
TwinLink::acceptInboundConnection(). Pending entries are cleaned up on
timeout, disconnect, and successful handoff. No server is created when
no [TWIN] section is configured.
This commit is contained in:
Audric committed 2026-04-15 20:54:51 +02:00
1 parent 9f349fff5c
commit 4b6346d4ab
2 files changed
+147 -15

No files matched your search

+6
View File
@@ -385,6 +385,12 @@ class Reflector : public sigc::trackable
void initTrunkServer(void);
void initTwinLink(void);
void initTwinServer(void);
void twinClientConnected(Async::FramedTcpConnection* con);
void twinClientDisconnected(Async::FramedTcpConnection* con,
Async::FramedTcpConnection::DisconnectReason reason);
void twinPendingFrameReceived(Async::FramedTcpConnection* con,
std::vector<uint8_t>& data);
void twinPendingTimeout(Async::Timer* t);
void trunkClientConnected(Async::FramedTcpConnection* con);
void trunkClientDisconnected(Async::FramedTcpConnection* con,
Async::FramedTcpConnection::DisconnectReason reason);