summaryrefslogtreecommitdiff
path: root/include/socket.h
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-07-13 00:47:53 +0100
committerPeter Powell <petpow@saberuk.com>2018-07-18 19:21:45 +0100
commit87e328a1fbfcacafc013ba580d31dd4123f1e7e2 (patch)
tree5e7368079fec41e74cd0c30a6b80fa6da7b9599b /include/socket.h
parent8f5952d1e56c9dbefebbacfc7e40546a9df901e8 (diff)
Add the family() member to the sockaddrs union.
Diffstat (limited to 'include/socket.h')
-rw-r--r--include/socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/socket.h b/include/socket.h
index aec06b526..6e9a20518 100644
--- a/include/socket.h
+++ b/include/socket.h
@@ -59,6 +59,8 @@ namespace irc
struct sockaddr sa;
struct sockaddr_in in4;
struct sockaddr_in6 in6;
+ /** Return the family of the socket (e.g. AF_INET). */
+ int family() const;
/** Return the size of the structure for syscall passing */
socklen_t sa_size() const;
/** Return port number or -1 if invalid */