summaryrefslogtreecommitdiff
path: root/node/Socket.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Socket.hpp')
-rw-r--r--node/Socket.hpp9
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