improved testing and connection handling
This commit is contained in:
@@ -56,6 +56,7 @@ namespace ZeroTier {
|
||||
|
||||
std::queue<Connection*> _AcceptedConnections;
|
||||
SocketTap *tap; // Reference to SocketTap
|
||||
int state; // See ZeroTierSDK.h for (ZT_SOCK_STATE_*)
|
||||
|
||||
Connection() {
|
||||
ZT_PHY_SOCKFD_TYPE fdpair[2];
|
||||
@@ -69,5 +70,15 @@ namespace ZeroTier {
|
||||
app_fd = fdpair[1];
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* A helper object for passing SocketTaps and Connections through the stack
|
||||
*/
|
||||
struct ConnectionPair
|
||||
{
|
||||
SocketTap *tap;
|
||||
Connection *conn;
|
||||
ConnectionPair(SocketTap *_tap, Connection *conn) : tap(_tap), conn(conn) {}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user