diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-04-10 11:17:54 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-04-10 11:17:54 -0700 |
| commit | b117ff54358d4e2b6b8eae4bd5300464f377d948 (patch) | |
| tree | 3329edee4e08e39e8cfa4c4d4f8cf6aa1b349ffb /node/Socket.hpp | |
| parent | 119ef5ecbf5653ddf497666e18894fa148cc2e9b (diff) | |
| download | infinitytier-b117ff54358d4e2b6b8eae4bd5300464f377d948.tar.gz infinitytier-b117ff54358d4e2b6b8eae4bd5300464f377d948.zip | |
Probable fix for GitHub issue #63 - do not unite() if either path is TCP, since doing so can result in asymmetric failed NAT-t over UDP if one side has a firewall that permits outgoing UDP but not incoming.
Diffstat (limited to 'node/Socket.hpp')
| -rw-r--r-- | node/Socket.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/node/Socket.hpp b/node/Socket.hpp index 3cfedb1a..e91ce4de 100644 --- a/node/Socket.hpp +++ b/node/Socket.hpp @@ -81,6 +81,15 @@ public: } /** + * @return True if this is a UDP socket + */ + inline bool udp() const + throw() + { + return ((_type == ZT_SOCKET_TYPE_UDP_V4)||(_type == ZT_SOCKET_TYPE_UDP_V6)); + } + + /** * @return True if this is a TCP socket */ inline bool tcp() const |
