Oops... turns out we need to differentiate incoming from outgoing TCP and indeed learn incoming TCP paths. Otherwise the recipient of a TCP connection does not know to reply via TCP! Heh.
This commit is contained in:
@@ -65,7 +65,8 @@ public:
|
||||
{
|
||||
ZT_SOCKET_TYPE_UDP_V4,
|
||||
ZT_SOCKET_TYPE_UDP_V6,
|
||||
ZT_SOCKET_TYPE_TCP
|
||||
ZT_SOCKET_TYPE_TCP_IN, // incoming connection, not listen
|
||||
ZT_SOCKET_TYPE_TCP_OUT
|
||||
};
|
||||
|
||||
virtual ~Socket() {}
|
||||
@@ -79,6 +80,15 @@ public:
|
||||
return _type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if this is a TCP socket
|
||||
*/
|
||||
inline bool tcp() const
|
||||
throw()
|
||||
{
|
||||
return ((_type == ZT_SOCKET_TYPE_TCP_IN)||(_type == ZT_SOCKET_TYPE_TCP_OUT));
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a ZeroTier message packet
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user