f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe 1;     None 1;=<$ KPrivate newtype proxy for the Storable instance. To avoid orphan instances.'Independent of endianness. For example ::1 is stored as  (0, 0, 0, 1).For direct manipulation prefer m and n.The raw network byte order number is read using host byte order. Therefore on little-endian architectures the byte order is swapped. For example  127.0.0.1 is represented as  0x0100007f on little-endian hosts and as  0x7f000001 on big-endian hosts.For direct manipulation prefer k and l.{The existence of a constructor does not necessarily imply that that socket address type is supported on your system: see d. Use the Num, instance (i.e. use a literal) to create a  PortNumber value with the correct network-byte-ordering. You should not use the PortNum constructor. It will be removed in the next release.1 :: PortNumber1read "1" :: PortNumber1 Address families.]A constructor being present here does not mean it is supported by the operating system: see b.N Socket Types.rThe existence of a constructor does not necessarily imply that that socket type is supported on your system: see _.O)0, used in getAddrInfo hints, for exampleP SOCK_STREAMQ SOCK_DGRAMRSOCK_RAWSSOCK_RDMTSOCK_SEQPACKETUThe status of the socket as determined by this libraryA, not necessarily reflecting the state of the connection itself.For example, the [ status is applied when the close function is called.V!Newly created, unconnected socketW Bound, via bindXListening, via listenYConnected or accepted, via connect or acceptZ Is now a Handle (via socketToHandle), don't touch[Closed was closed by close]A socket data type. ])s are not GCed unless they are closed by close._TDoes the SOCK_ constant corresponding to the given SocketType exist on this system? >Find the SOCK_ constant corresponding to the SocketType value. Try packSocketType' on the SocketType, if it fails throw an error with message starting "Network.Socket." ++ the String parameter}Try unpackSocketType on the CInt, if it fails throw an error with message starting "Network.Socket." ++ the String parameterbNDoes the AF_ constant corresponding to the given family exist on this system?d4Is the socket address type supported on this system?e;Computes the storage requirements (in bytes) of the given . This function differs from $ in that the value of the argument is used.f=Computes the storage requirements (in bytes) required for a  with the given  .gUse a + with a function requiring a pointer to a  and the length of that .h Create a new 3 for use with a function requiring a pointer to a  and the length of that .iWrite the given  to the given memory location.jRead a  from the given memory location.k Converts @ to representation-independent IPv4 quadruple. For example for  127.0.0.1 the function will return (0x7f, 0, 0, 1) regardless of host endianness.lConverts IPv4 quadruple to .oZero a structure.y  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNPOQRSTUVWXYZ[\]^_ ` abcdefghijklmno   B  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^"(c) The University of Glasgow 20012BSD-style (see the file libraries/network/LICENSE)libraries@haskell.org provisionalportableNone 1;d p Throw an Q corresponding to the current socket error if the IO action returns a result of -1o, but retries in case of an interrupted operation. Discards the result of the IO action after error handling.q Throw an Q corresponding to the current socket error if the IO action returns a result of -1, but retries in case of an interrupted operation. Checks for operations that would block and executes an alternative action before retrying in that case.r Throw an Q corresponding to the current socket error if the IO action returns a result of -13, but retries in case of an interrupted operation.s Throw an Q corresponding to the current socket error if the IO action returns a result of -1>. Discards the result of the IO action after error handling.t Throw an + corresponding to the current socket error.uLike t0, but the error code is supplied as an argument.?On Windows, do not use errno. Use a system error code instead.vLike r , but if the action fails with  EWOULDBLOCKB or similar, wait for the socket to be read-ready, and try again.wLike r , but if the action fails with  EWOULDBLOCKC or similar, wait for the socket to be write-ready, and try again.xWith older versions of the networkw library (version 2.6.0.2 or earlier) on Windows operating systems, the networking subsystem must be initialised using x2 before any networking operations can be used. eg. main = withSocketsDo $ do {...}It is fine to nest calls to x-, and to perform networking operations after x has returned.In newer versions of the networkB library (version v2.6.1.0 or later) it is only necessary to call x if you are calling the ^u constructor directly. However, for compatibility with older versions on Windows, it is good practice to always call x (it's very cheap).p#textual description of the locationthe  operation to be executedq#textual description of the locationFaction to execute before retrying if an immediate retry would blockthe  operation to be executedr#textual description of the locationthe  operation to be executeds#textual description of the locationthe  operation to be executedt)textual description of the error location^  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMefghijopqrstuvwx^ jiefgh  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMtusrpqvwxo"(c) The University of Glasgow 20012BSD-style (see the file libraries/network/LICENSE)libraries@haskell.org provisionalportableNone "#1;V?Yy-Flags that control the querying behaviour of . For more information, see +https://tools.ietf.org/html/rfc3493#page-30zResolve a datagram-based service name. This is required only for the few protocols that have different port numbers for their datagram-based versions than for their stream-based versions.{;If the hostname cannot be looked up, an IO error is thrown.|>If a host is local, return only the hostname part of the FQDN.}The name of the host is not looked up. Instead, a numeric representation of the host's address is returned. For an IPv4 address, this will be a dotted-quad string. For IPv6, it will be colon-separated hexadecimal.~nThe name of the service is not looked up. Instead, a numeric representation of the service is returned.-Flags that control the querying behaviour of . For more information, see +https://tools.ietf.org/html/rfc3493#page-25The list of returned  values will only contain IPv4 addresses if the local system has at least one IPv4 interface configured, and likewise for IPv6. (Only some platforms support this.)If  is specified, return all matching IPv6 and IPv4 addresses. Otherwise, this flag has no effect. (Only some platforms support this.)The  field of the first returned / will contain the "canonical name" of the host.The  argument must[ be a numeric address in string form, and network name lookups will not be attempted.The  argument must{ be a port number in string form, and service name lookups will not be attempted. (Only some platforms support this.)If no 3 value is provided, the network address in each } will be left as a "wild card". This is useful for server applications that will accept connections from any client.If an IPv6 lookup is performed, and no IPv6 addresses are found, IPv6-mapped IPv4 addresses will be returned. (Only some platforms support this.)Socket options for use with  and .iThe existence of a constructor does not imply that the relevant option is supported on your system: see SO_DEBUG SO_REUSEADDRSO_TYPESO_ERROR SO_DONTROUTE SO_BROADCAST SO_SNDBUF SO_RCVBUF SO_KEEPALIVE SO_OOBINLINEIP_TTL TCP_MAXSEG TCP_NODELAYTCP_CORK SO_LINGER SO_REUSEPORT SO_RCVLOWAT SO_SNDLOWAT SO_RCVTIMEO SO_SNDTIMEOSO_USELOOPBACKTCP_USER_TIMEOUT IPV6_V6ONLYEither a host name e.g.,  "haskell.org"i or a numeric host address string consisting of a dotted decimal IPv4 address or an IPv6 address e.g.,  "192.168.0.1".8Converts the from network byte order to host byte order.8Converts the from host byte order to network byte order.%Smart constructor for constructing a ]. It should only be called once for every new file descriptor. The caller must make sure that the socket is in non-blocking mode. See .,Obtaining the file descriptor from a socket.1This is the default protocol for a given service.uCreate a new socket using the given address family, socket type and protocol number. The address family is usually , , or  . The socket type is usually P or Q". The protocol number is usually . If  is used and the socket type is P or Q, the V socket option is set to 0 so that both IPv4 and IPv6 can be handled with one socket.blet hints = defaultHints { addrFlags = [AI_NUMERICHOST, AI_NUMERICSERV], addrSocketType = Stream }Caddr:_ <- getAddrInfo (Just hints) (Just "127.0.0.1") (Just "5000")Jsock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)bind sock (addrAddress addr)getSocketName sock127.0.0.1:5000Build a pair of connected socket objects using the given address family, socket type, and protocol number. Address family, socket type, and protocol number are as for the % function above. Availability: Unix.ASet the nonblocking flag on Unix. On Windows, nothing is done.CSet the close_on_exec flag on Unix. On Windows, nothing is done.Since 2.7.0.0.FGet the nonblocking flag. On Windows, this function always returns .Since 2.7.0.0.HGet the close_on_exec flag. On Windows, this function always returns .Since 2.7.0.0.KBind the socket to an address. The socket must not already be bound. The   passed to bind% must be the same as that passed to . If the special port number @ is passed then the system assigns the next available use port.&Connect to a remote socket at address.Listen for connections made to the socket. The second argument specifies the maximum number of queued connections and should be at least 1; the maximum value is system-dependent (usually 5).yAccept a connection. The socket must be bound to an address and listening for connections. The return value is a pair (conn, address) where connP is a new socket object usable to send and receive data on the connection, and addressH is the address bound to the socket on the other end of the connection.Send data to the socket. The recipient can be specified explicitly, so the socket need not be in a connected state. Returns the number of bytes sent. Applications are responsible for ensuring that all data has been sent.SNOTE: blocking on Windows unless you compile with -threaded (see GHC ticket #1129)Send data to the socket. The recipient can be specified explicitly, so the socket need not be in a connected state. Returns the number of bytes sent. Applications are responsible for ensuring that all data has been sent.TReceive data from the socket. The socket need not be in a connected state. Returns (bytes, nbytes, address) where bytes is a String of length nbytes% representing the data received and address is a 1 representing the address of the sending socket.SNOTE: blocking on Windows unless you compile with -threaded (see GHC ticket #1129)Receive data from the socket, writing it into buffer instead of creating a new string. The socket need not be in a connected state. Returns (nbytes, address) where nbytes& is the number of bytes received and address is a 1 representing the address of the sending socket.SNOTE: blocking on Windows unless you compile with -threaded (see GHC ticket #1129)Send data to the socket. The socket must be connected to a remote socket. Returns the number of bytes sent. Applications are responsible for ensuring that all data has been sent.>Sending data to closed socket may lead to undefined behaviour.Send data to the socket. The socket must be connected to a remote socket. Returns the number of bytes sent. Applications are responsible for ensuring that all data has been sent.>Sending data to closed socket may lead to undefined behaviour.Receive data from the socket. The socket must be in a connected state. This function may return fewer bytes than specified. If the message is longer than the specified length, it may be discarded depending on the type of socket. This function may block until a message arrives.}Considering hardware and network realities, the maximum number of bytes to receive should be a small power of 2, e.g., 4096.gFor TCP sockets, a zero length return value means the peer has closed its half side of the connection.BReceiving data from closed socket may lead to undefined behaviour.Receive data from the socket. The socket must be in a connected state. This function may return fewer bytes than specified. If the message is longer than the specified length, it may be discarded depending on the type of socket. This function may block until a message arrives.}Considering hardware and network realities, the maximum number of bytes to receive should be a small power of 2, e.g., 4096.gFor TCP sockets, a zero length return value means the peer has closed its half side of the connection.BReceiving data from closed socket may lead to undefined behaviour. Does the  exist on this system?For a socket option, return Just (level, value) where level is the corresponding C option level constant (e.g. SOL_SOCKET) and value is the option constant itself (e.g. SO_DEBUG) If either constant does not exist, return Nothing.Return the option level and option value if they exist, otherwise throw an error that begins "Network.Socket." ++ the String parameterpSet a socket option that expects an Int value. There is currently no API to set e.g. the timeval socket optionsnGet a socket option that gives an Int value. There is currently no API to get e.g. the timeval socket optionsAGetting process ID, user ID and group ID for UNIX-domain sockets.This is implemented with SO_PEERCRED on Linux and getpeereid() on BSD variants. Unfortunately, on some BSD variants getpeereid() returns unexpected results, rather than an error, for AF_INET sockets. It is the user's responsibility to make sure that the socket is a UNIX-domain socket. Also, on some BSD variants, getpeereid() does not return credentials for sockets created via d, only separately created and then explicitly connected UNIX-domain sockets work on such systems.Since 2.7.0.0.?Returns the processID, userID and groupID of the socket's peer.Only available on platforms that support SO_PEERCRED or GETPEEREID(3) on domain sockets. GETPEEREID(3) returns userID and groupID. processID is always 0.1Whether or not UNIX-domain sockets are available.Since 3.0.0.0.Receive a file descriptor over a domain socket. Note that the resulting file descriptor may have to be put into non-blocking mode in order to be used safely. See .The IPv4 wild card address.The IPv6 wild card address.This is the value of SOMAXCONN, typically 128. 128 is good enough for normal network servers but is too small for high performance servers.Shut down one or both halves of the connection, depending on the second argument to the function. If the second argument is ., further receives are disallowed. If it is +, further sends are disallowed. If it is ,, further sends and receives are disallowed.hClose the socket. Sending data to or receiving data from closed socket may lead to undefined behaviour.Determines whether  has been used on the ] . This does not| indicate any status about the socket beyond this. If the socket has been closed remotely, this function can still return .Turns a Socket into an 1. By default, the new handle is unbuffered. Use  to change the buffering.Note that since a } is automatically closed by a finalizer when it is no longer referenced, you should avoid doing any more operations on the ] after calling . To close the ] after , call  on the . Pack a list of values into a bitmask. The possible mappings from value to bit-to-set are given as the first argument. We assume that each value can cause exactly one bit to be set; unpackBits will break if this property is not true.!'Unpack a bitmask into a list of values.Indicate whether the given & will have any effect on this system.&Default hints for address lookup with . The values of the  and  fields are ", and are never inspected by .addrFlags defaultHints[]addrFamily defaultHints AF_UNSPECaddrSocketType defaultHints NoSocketTypeaddrProtocol defaultHints0#Shows the fields of 5, without inspecting the by-default undefined fields  and .>Resolve a host or service name to one or more addresses. The + values that this function returns contain ' values that you can pass directly to  or .^This function is protocol independent. It can return both IPv4 and IPv6 address information.The  argument specifies the preferred query behaviour, socket options, or protocol. You can override these conveniently using Haskell's record update syntax on , for example as follows:Rlet hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Stream }You must provide a $ value for at least one of the  or  arguments.  can be either a numeric network address (dotted quad for IPv4, colon-separated hex for IPv6) or a hostname. In the latter case, its addresses will be looked up unless 3 is specified as a hint. If you do not provide a  value and do not set a as a hint, network addresses in the result will contain the address of the loopback interface.If the query fails, this function throws an IO exception instead of returning an empty list. Otherwise, it returns a non-empty list of  values.There are several reasons why a query might result in several values. For example, the queried-for host could be multihomed, or the service might be available via several protocols.HNote: the order of arguments is slightly different to that defined for  getaddrinfo in RFC 2553. The ; parameter comes first to make partial application easier.Caddr:_ <- getAddrInfo (Just hints) (Just "127.0.0.1") (Just "http")addrAddress addr 127.0.0.1:80cResolve an address to a host or service name. This function is protocol independent. The list of y! values controls query behaviour.sIf a host or service's name cannot be looked up, then the numeric form of the address or service will be returned.9If the query fails, this function throws an IO exception. Example: : (hostName, _) <- getNameInfo [] True False myAddress Deprecated alias for .Deprecated alias for .6Returns the index corresponding to the interface name.Since 2.7.0.0.6Returns the interface name corresponding to the index.Since 2.7.0.0.!preferred socket type or protocolhost name to look upservice name to look up%resolved addresses, with "best" first!flags to control lookup behaviourwhether to look up a hostname!whether to look up a service namethe address to look up  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNPOQRSTUVWXYZ[\]^_`abcdklmnxy}z{|~x]^NOPQRST_  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMb\dklmn yz{|}~UVWXYZ[ac`yz{|}~None 1;G%&'()*%&'()*(c) Johan Tibell 2007-2010 BSD-stylejohan.tibell@gmail.comstableportableNone 1;Ix+,- None 1;K[Connected socket Data to sendNumber of bytes sentConnected socket Data to send(c) Johan Tibell 2007-2010 BSD-stylejohan.tibell@gmail.comstableportableNone 1; Send data to the socket. The socket must be connected to a remote socket. Returns the number of bytes sent. Applications are responsible for ensuring that all data has been sent.>Sending data to closed socket may lead to undefined behaviour.TSend data to the socket. The socket must be connected to a remote socket. Unlike , this function continues to send data until either all data has been sent or an error occurs. On error, an exception is raised, and there is no way to determine how much data, if any, was successfully sent.>Sending data to closed socket may lead to undefined behaviour.Send data to the socket. The recipient can be specified explicitly, so the socket need not be in a connected state. Returns the number of bytes sent. Applications are responsible for ensuring that all data has been sent.>Sending data to closed socket may lead to undefined behaviour.~Send data to the socket. The recipient can be specified explicitly, so the socket need not be in a connected state. Unlike , this function continues to send data until either all data has been sent or an error occurs. On error, an exception is raised, and there is no way to determine how much data, if any, was successfully sent.>Sending data to closed socket may lead to undefined behaviour.PSend data to the socket. The socket must be in a connected state. The data is sent as if the parts have been concatenated. This function continues to send data until either all data has been sent or an error occurs. On error, an exception is raised, and there is no way to determine how much data, if any, was successfully sent.>Sending data to closed socket may lead to undefined behaviour.Send data to the socket. The recipient can be specified explicitly, so the socket need not be in a connected state. The data is sent as if the parts have been concatenated. This function continues to send data until either all data has been sent or an error occurs. On error, an exception is raised, and there is no way to determine how much data, if any, was successfully sent.>Sending data to closed socket may lead to undefined behaviour.Receive data from the socket. The socket must be in a connected state. This function may return fewer bytes than specified. If the message is longer than the specified length, it may be discarded depending on the type of socket. This function may block until a message arrives.}Considering hardware and network realities, the maximum number of bytes to receive should be a small power of 2, e.g., 4096.gFor TCP sockets, a zero length return value means the peer has closed its half side of the connection.BReceiving data from closed socket may lead to undefined behaviour.VReceive data from the socket. The socket need not be in a connected state. Returns (bytes, address) where bytes is a .$ representing the data received and address is a 0 representing the address of the sending socket.BReceiving data from closed socket may lead to undefined behaviour./,Suppose we try to transmit a list of chunks cs0 via a gathering write operation and find that n bytes were sent. Then remainingChunks n cs) is list of chunks remaining to be sent.0totalLength cs5 is the sum of the lengths of the chunks in the list cs.1withIOVec cs f executes the computation fw, passing as argument a pair consisting of a pointer to a temporarily allocated array of pointers to IOVec made from cs and the number of pointers ( length cs).  Unix only.Connected socket Data to sendNumber of bytes sentConnected socket Data to sendSocket Data to sendRecipient addressNumber of bytes sentSocket Data to sendRecipient addressConnected socket Data to sendSocket Data to sendRecipient addressConnected socket"Maximum number of bytes to receive Data receivedSocket"Maximum number of bytes to receive Data received and sender address(c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.com experimental POSIX, GHCNone 1;Receive data from the socket. The socket must be in a connected state. Data is received on demand, in chunks; each chunk will be sized to reflect the amount of data received by individual  calls.All remaining data from the socket is consumed. When there is no more data to be received, the receiving side of the socket is shut down. If there is an error and an exception is thrown, the socket is not shut down.#Receive data from the socket. The socket must be in a connected state. This function may return fewer bytes than specified. If the received data is longer than the specified length, it may be discarded depending on the type of socket. This function may block until a message arrives.:If there is no more data to be received, returns an empty 2.BReceiving data from closed socket may lead to undefined behaviour.Connected socket Data receivedConnected socket"Maximum number of bytes to receive Data received "(c) The University of Glasgow 20012BSD-style (see the file libraries/network/LICENSE)libraries@haskell.org experimental non-portableNone 1; 3Get service by name.4Get the service given a   and 5.6Get the   corresponding to the .7 Resolve a  to IPv4 address.8Get a 9\ corresponding to the given address and family. Note that only IPv4 is currently supported.:Open the network name database. The parameter specifies whether a connection is maintained open between various networkEntry calls;2Close the connection to the network name database.< Get the list of network entries.=cCalling getHostName returns the standard host name for the current processor, as set at boot time.< \>?@ABCDE9FGHIJKLMNOPQRSTU5346VWXYZ[\]^_`a78bcdefgh:;<=>?@ABC9FGHIJKLMNOPQRSTU "(c) The University of Glasgow 20012BSD-style (see the file libraries/network/LICENSE)libraries@haskell.org provisionalportableNone 1;iCalling i creates a client side socket which is connected to the given host and port. The Protocol and socket type is derived from the given port identifier. If a port number is given then the result is always an internet family P socket.jKCreates the server side socket which has been bound to the specified port. (typically 128) is specified to the listen queue. This is good enough for normal network servers but is too small for high performance servers.5To avoid the "Address already in use" problems, the . socket option is set on the listening socket.If available, the X socket option is set to 0 so that both IPv4 and IPv6 can be accepted with this socket.BIf you don't like the behavior above, please use the lower level  instead.k+Accept a connection on a socket created by j. Normal I/O operations (see  System.IO) can be used on the - returned to communicate with the client. Notice that although you can pass any Socket to Network.accept, only sockets of either AF_UNIX, AF_INET, or AF_INET6 will work (this shouldn't be a problem, though). When using AF_UNIX, HostName will be set to the path of the socket and PortNumber to -1.lhClose the socket. Sending data to or receiving data from closed socket may lead to undefined behaviour.m Returns the n associated with a given socket.jPort IdentifierListening SocketkListening SocketTriple of: read/write * for communicating with the client, the  of the peer socket, and the   of the remote connection.o-computation to run first ("acquire resource"),computation to run last ("release resource")computation to run in-between ]xnpqrijklstmnqpru   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~        !"#$%&'&()*+,-./00123456789:;<=8>: ? @ A B C D E F G H I J J K L M N O P E Q R S T U U V W X Y Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t  u v w&network-2.7.0.0-7xjUZXCmB8P3ktkBtp6AVlNetwork.Socket.InternalNetwork.SocketNetwork.Socket.ByteString.LazyNetwork.Socket.ByteStringNetwork.Socket.ByteString.IOVecNetwork.Socket.Types Network.Socket.ByteString.MsgHdr"Network.Socket.ByteString.Internal$Network.Socket.ByteString.Lazy.Posix Network.BSDNetwork HostAddress6 HostAddressSockAddr SockAddrInet SockAddrInet6 SockAddrUnix SockAddrCanScopeIDFlowInfo PortNumberPortNumFamily AF_UNSPECAF_UNIXAF_INETAF_INET6 AF_IMPLINKAF_PUPAF_CHAOSAF_NSAF_NBSAF_ECMA AF_DATAKITAF_CCITTAF_SNA AF_DECnetAF_DLIAF_LAT AF_HYLINK AF_APPLETALKAF_ROUTE AF_NETBIOSAF_NITAF_802AF_ISOAF_OSI AF_NETMANAF_X25AF_AX25 AF_OSINET AF_GOSSIPAF_IPX Pseudo_AF_XTPAF_CTFAF_WANAF_SDL AF_NETWAREAF_NDDAF_INTFAF_COIPAF_CNTPseudo_AF_RTIP Pseudo_AF_PIPAF_SIPAF_ISDN Pseudo_AF_KEYAF_NATMAF_ARPPseudo_AF_HDRCMPLTAF_ENCAPAF_LINKAF_RAWAF_RIF AF_NETROM AF_BRIDGE AF_ATMPVCAF_ROSE AF_NETBEUI AF_SECURITY AF_PACKETAF_ASH AF_ECONET AF_ATMSVCAF_IRDAAF_PPPOX AF_WANPIPE AF_BLUETOOTHAF_CAN SocketType NoSocketTypeStreamDatagramRawRDM SeqPacket SocketStatus NotConnectedBound Listening ConnectedConvertedToHandleClosedProtocolNumberSocketMkSocketisSupportedSocketTypepackSocketType packFamilyisSupportedFamily unpackFamilyisSupportedSockAddrsizeOfSockAddrsizeOfSockAddrByFamily withSockAddrwithNewSockAddr pokeSockAddr peekSockAddrhostAddressToTupletupleToHostAddresshostAddress6ToTupletupleToHostAddress6 zeroMemorythrowSocketErrorIfMinus1Retry_%throwSocketErrorIfMinus1RetryMayBlockthrowSocketErrorIfMinus1RetrythrowSocketErrorIfMinus1_throwSocketErrorthrowSocketErrorCodethrowSocketErrorWaitReadthrowSocketErrorWaitWrite withSocketsDo NameInfoFlagNI_DGRAM NI_NAMEREQD NI_NOFQDNNI_NUMERICHOSTNI_NUMERICSERVAddrInfo addrFlags addrFamilyaddrSocketType addrProtocol addrAddress addrCanonName AddrInfoFlag AI_ADDRCONFIGAI_ALL AI_CANONNAMEAI_NUMERICHOSTAI_NUMERICSERV AI_PASSIVE AI_V4MAPPED ShutdownCmdShutdownReceive ShutdownSend ShutdownBoth SocketOptionDebug ReuseAddrTypeSoError DontRoute Broadcast SendBuffer RecvBuffer KeepAlive OOBInline TimeToLive MaxSegmentNoDelayCorkLinger ReusePort RecvLowWater SendLowWater RecvTimeOut SendTimeOut UseLoopBack UserTimeoutIPv6Only CustomSockOpt ServiceNameHostNamentohlhtonlmkSocketfdSocketdefaultProtocolsocket socketPairsetNonBlockIfNeededsetCloseOnExecIfNeededgetCloseOnExec getNonBlockbindconnectlistenacceptsendTo sendBufTorecvFrom recvBufFromsendsendBufrecvrecvLenrecvBuf socketPort getPeerName getSocketNameisSupportedSocketOptionsetSocketOptiongetSocketOptiongetPeerCredential getPeerCredisUnixDomainSocketAvailablesendFdrecvFdaNY_PORT defaultPort iNADDR_ANY iN6ADDR_ANY sOMAXCONN sOL_SOCKET sCM_RIGHTSmaxListenQueueshutdownclose isConnectedisBound isListening isReadable isWritable inet_addr inet_ntoasocketToHandleaddrInfoFlagImplemented defaultHints getAddrInfo getNameInfo bindSocketsClose sIsConnectedsIsBound sIsListening sIsReadable sIsWritable ifNameToIndex ifIndexToName$fStorableAddrInfo$fShowSockAddr$fShowSocketOption$fEqAddrInfoFlag$fReadAddrInfoFlag$fShowAddrInfoFlag $fEqAddrInfo$fShowAddrInfo$fEqNameInfoFlag$fReadNameInfoFlag$fShowNameInfoFlagsendAll sendAllTosendMany sendManyTo getContentsIOVeciovBaseiovLenIn6AddrpackSocketType'packSocketTypeOrThrowunpackSocketType'baseForeign.StorablesizeOfsockFd sockFamilysockType sockProtocol sockStatusunpackSocketTypeGHC.IO.ExceptionIOErrorghc-prim GHC.TypesIOFalsepackSocketOptionpackSocketOption'TrueGHC.IO.Handle.TypesHandle GHC.IO.Handle hSetBufferinghClosepackBits unpackBitsGHC.Err undefinedshowDefaultHintsGHC.BaseJustMsgHdrmsgName msgNameLenmsgIov msgIovLen c_sendmsgc_writevmkInvalidRecvArgErrorbytestring-0.10.8.2Data.ByteString.Internal ByteStringremainingChunks totalLength withIOVecData.ByteString.Lazy.InternalgetServiceByNamegetServiceByPort ProtocolNamegetServicePortNumber getHostByName getHostByAddr HostEntrysetNetworkEntryendNetworkEntrygetNetworkEntries getHostName NetworkEntry networkNamenetworkAliases networkFamilynetworkAddress NetworkName NetworkAddrhostName hostAliases hostFamily hostAddresses ProtocolEntry protoName protoAliases protoNumber ServiceEntry serviceNameserviceAliases servicePortserviceProtocolgetServiceEntrysetServiceEntryendServiceEntrygetServiceEntriesgetProtocolByNamegetProtocolByNumbergetProtocolNumbergetProtocolEntrysetProtocolEntryendProtocolEntrygetProtocolEntries hostAddress getHostEntry setHostEntry endHostEntrygetHostEntriesgetNetworkByNamegetNetworkByAddrgetNetworkEntry connectTolistenOnPortIDbracketOnErrorService UnixSocket