From 99ae191859d14f06b531801eac386686605d333e Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 1 Jul 2013 19:20:06 -0400 Subject: track remote useres in the remoteUsers map. --- Presence/XMPPTypes.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Presence/XMPPTypes.hs') 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 socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6 socketFamily (SockAddrUnix _) = AF_UNIX +withPort (SockAddrInet _ a) port = SockAddrInet (toEnum port) a +withPort (SockAddrInet6 _ a b c) port = SockAddrInet6 (toEnum port) a b c + +withoutPort = (`withPort` 0) -- cgit v1.2.3