diff options
Diffstat (limited to 'node/Socket.hpp')
| -rw-r--r-- | node/Socket.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/node/Socket.hpp b/node/Socket.hpp index ff185e6f..3cfedb1a 100644 --- a/node/Socket.hpp +++ b/node/Socket.hpp @@ -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() {} @@ -80,6 +81,15 @@ public: } /** + * @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 * * @param to Destination address (ignored in connected TCP sockets) |
