summaryrefslogtreecommitdiff
path: root/Presence/XMPPTypes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/XMPPTypes.hs')
-rw-r--r--Presence/XMPPTypes.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Presence/XMPPTypes.hs b/Presence/XMPPTypes.hs
index 8af1018c..b46b4294 100644
--- a/Presence/XMPPTypes.hs
+++ b/Presence/XMPPTypes.hs
@@ -164,4 +164,8 @@ socketFamily (SockAddrInet _ _) = AF_INET
164socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6 164socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6
165socketFamily (SockAddrUnix _) = AF_UNIX 165socketFamily (SockAddrUnix _) = AF_UNIX
166 166
167withPort (SockAddrInet _ a) port = SockAddrInet (toEnum port) a
168withPort (SockAddrInet6 _ a b c) port = SockAddrInet6 (toEnum port) a b c
169
170withoutPort = (`withPort` 0)
167 171