diff options
Diffstat (limited to 'Presence/PeerResolve.hs')
-rw-r--r-- | Presence/PeerResolve.hs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/Presence/PeerResolve.hs b/Presence/PeerResolve.hs deleted file mode 100644 index 62becfe1..00000000 --- a/Presence/PeerResolve.hs +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | module PeerResolve | ||
2 | ( peerKeyToResolvedNames | ||
3 | , resolvePeer | ||
4 | , parseAddress | ||
5 | , unsafeParseAddress | ||
6 | , strip_brackets | ||
7 | , withPort | ||
8 | ) where | ||
9 | |||
10 | import Data.Text ( Text ) | ||
11 | import Network.Socket ( SockAddr(..) ) | ||
12 | import System.IO.Unsafe | ||
13 | |||
14 | import DNSCache | ||
15 | import ConnectionKey | ||
16 | |||
17 | {-# NOINLINE global_dns_cache #-} | ||
18 | global_dns_cache :: DNSCache | ||
19 | global_dns_cache = unsafePerformIO $ newDNSCache | ||
20 | |||
21 | resolvePeer :: Text -> IO [PeerAddress] | ||
22 | resolvePeer addrtext = map PeerAddress <$> forwardResolve global_dns_cache addrtext | ||
23 | |||
24 | peerKeyToResolvedNames :: PeerAddress -> IO [Text] | ||
25 | peerKeyToResolvedNames (PeerAddress addr) | ||
26 | = reverseResolve global_dns_cache addr | ||
27 | |||