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:
parent
595b386afc
commit
f13493edb2
11 changed files with 147 additions and 110 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue