-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Printing SockAddr
--   
--   Printing SockAddr
@package sockaddr
@version 0.0.1

-- | Converting an address in SockAddr.
module Network.SockAddr

-- | Convert SockAddr to String. If the address is an
--   IPv4-embedded IPv6 address, the IPv4 is extracted.
--   
--   
--   >>> import Network.Socket
--   
--   >>> as <- getAddrInfo (Just defaultHints) (Just "example.org") (Just "http")
--   
--   >>> map (showSockAddr.addrAddress) as
--   ["93.184.216.119","93.184.216.119","2606:2800:220:6d:26bf:1447:1097:aa7","2606:2800:220:6d:26bf:1447:1097:aa7"]
--   
showSockAddr :: SockAddr -> String

-- | Convert SockAddr to ByteString. If the address is an
--   IPv4-embedded IPv6 address, the IPv4 is extracted.
--   
--   
--   >>> import Network.Socket
--   
--   >>> as <- getAddrInfo (Just defaultHints) (Just "localhost") (Just "http")
--   
--   >>> map (showSockAddrBS.addrAddress) as
--   ["127.0.0.1","::1","fe80:0:0:0:0:0:0:1"]
--   
showSockAddrBS :: SockAddr -> ByteString
