diff options
Diffstat (limited to 'Presence/XMPPTypes.hs')
-rw-r--r-- | Presence/XMPPTypes.hs | 4 |
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 | |||
164 | socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6 | 164 | socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6 |
165 | socketFamily (SockAddrUnix _) = AF_UNIX | 165 | socketFamily (SockAddrUnix _) = AF_UNIX |
166 | 166 | ||
167 | withPort (SockAddrInet _ a) port = SockAddrInet (toEnum port) a | ||
168 | withPort (SockAddrInet6 _ a b c) port = SockAddrInet6 (toEnum port) a b c | ||
169 | |||
170 | withoutPort = (`withPort` 0) | ||
167 | 171 | ||