h$ŝ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferredk Safe-Inferred network6Returns the index corresponding to the interface name.Since 2.7.0.0.network6Returns the interface name corresponding to the index.Since 2.7.0.0.None network%Message flags. To combine flags, use .network8Wait until the requested number of bytes have been read.networkReceived control message is truncated. More control message exist.network,Received data is truncated. More data exist.networkEnd of record.network7snetworkPrivate newtype proxy for the Storable instance. To avoid orphan instances.network'Independent of endianness. For example ::1 is stored as  (0, 0, 0, 1).For direct manipulation prefer } and ~.networkThe 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 { and |.networkSocket addresses. The existence of a constructor does not necessarily imply that that socket address type is supported on your system: see z.networkThe path must have fewer than 104 characters. All of these characters must have code points less than 256.networkScope identifier.networkFlow information.network-The core typeclass to unify socket addresses.networkPort number. Use the Num. instance (i.e. use a literal) to create a  PortNumber value.1 :: PortNumber1read "1" :: PortNumber1show (12345 :: PortNumber)"12345"50000 < (51000 :: PortNumber)True50000 < (52000 :: PortNumber)True50000 + (10000 :: PortNumber)60000networkAddress families. The AF_xxxxx> constants are widely used as synonyms for the corresponding PF_xxxxx protocol family values, to which they are numerically equal in mainstream socket API implementations.+Stictly correct usage would be to pass the PF_xxxxx2 constants as the first argument when creating a   , while the AF_xxxxx constants should be used as  addrFamily values with  getAddrInfo. For now only the AF_xxxxx constants are provided.Some of the defined patterns may be unsupported on some systems: see w.network Socket Types.Some of the defined patterns may be unsupported on some systems: see v.networkProtocol number. networkBasic type for a socket.network8Converts the from network byte order to host byte order.network8Converts the from host byte order to network byte order.!networkController Area Network"networkbluetooth sockets#networkWanpipe API sockets$network PPPoX sockets%network IRDA sockets&networkATM SVCs'network Acorn Econet(networkAsh)network Packet family*networkSecurity callback pseudo AF+networkNetbeui 802.2LLC,networkAmateur Radio X.25 PLP-networkATM PVCs.networkmultiprotocol bridge/networkAmateur radio NetROM0network raw interface1networkLink layer interface2networkLink layer interface3networkENCAP4network/Used by BPF to not rewrite hdrs in iface output5network ARP (RFC 826)6networknative ATM access7network Internal key-management function8network#Integrated Services Digital Network9networkSimple Internet Protocol:networkHelp Identify PIP packets;networkHelp Identify RTIP packets<networkComputer Network Technology=network!connection-oriented IP, aka ST II>networkDebugging use only?networkNDD@networkNetwareAnetworkSGI Data Link for DLPIBnetworkWide Area Network protocolsCnetworkCommon Trace FacilityDnetwork!eXpress Transfer Protocol (no AF)EnetworkNovell Internet ProtocolFnetworkUS Government OSIGnetworkAFIHnetworkAX25Inetwork CCITT X.25JnetworkDNA Network ManagementKnetwork$umbrella of all families used by OSILnetwork ISO protocolsMnetworkIEEE 802.2, also ISO 8802NnetworkNetwork Interface TapOnetworkNetBios-style addressesPnetwork*Internal Routing Protocol (aka AF_NETLINK)Qnetwork Apple TalkRnetworkNSC HyperchannelSnetworkLATTnetworkDirect data link interfaceUnetworkDECnetVnetworkIBM SNAWnetworkCCITT protocols, X.25 etcXnetworkdatakit protocolsYnetworkeuropean computer manufacturersZnetwork nbs protocols[networkXEROX NS protocols\networkmit CHAOS protocols]networkpup protocols: e.g. BSP^networkArpanet imp addresses_networkInternet Protocol version 6`networkInternet Protocol version 4anetwork UNIX-domainbnetwork unspecifiedcnetworkUnsupported address family, equal to any other families that are not supported on the system.dnetwork>Pattern for a general protocol family (a.k.a. address family).jnetwork'Used in getAddrInfo hints, for example.knetworkUnsupported socket type, equal to any other types not supported on this system.lnetwork"Pattern for a general socket type.mnetworkCurrently, this is an alias of n.nnetwork(Getting a file descriptor from a socket.If a  1 is shared with multiple threads and one uses n, unexpected issues may happen. Consider the following scenario:1) Thread A acquires a  from   by n.2) Thread B close the  .3) Thread C opens a new  !. Unfortunately it gets the same ( number which thread A is holding.0In this case, it is safer for Thread A to clone  by ?. But this would still suffer from a race condition between n and s.9If you use this function, you need to guarantee that the   does not get garbage-collected until after you finish using the file descriptor. o can be used for this purpose.A safer option is to use p instead.onetworkEnsure that the given   stays alive (i.e. not garbage-collected) at the given place in the sequence of IO actions. This function can be used in conjunction with n to guarantee that the file descriptor is not prematurely freed. fd <- unsafeFdSocket sock -- using fd with blocking operations such as accept(2) touchSocket sockpnetworkGet a file descriptor from a  8. The socket will never be closed automatically before  withFdSocket? completes, but it may still be closed by an explicit call to s or s%`, either before or during the call.+The file descriptor must not be used after  withFdSocket returns, because the   may have been garbage-collected, invalidating the file descriptor.Since: 3.1.0.0qnetworkSocket is closed and a duplicated file descriptor is returned. The duplicated descriptor is no longer subject to the possibility of unexpectedly being closed if the socket is finalized. It is now the caller's responsibility to ultimately close the duplicated file descriptor.rnetwork)Creating a socket from a file descriptor.snetworkClose the socket. This function does not throw exceptions even if the underlying system call returns errors.5If multiple threads use the same socket and one uses n and the other use s, unexpected behavior may happen. For more information, please refer to the documentation of n.tnetworkClose the socket. This function throws exceptions if the underlying system call returns errors.unetwork1This is the default protocol for a given service.defaultProtocol0vnetworkIs the  SOCK_xxxxx constant corresponding to the given SocketType known on this system? l4 values, not equal to any of the named patterns or k, will return % even when not known on this system.wnetworkDoes one of the AF_ constants correspond to a known address family on this system. d' values, not equal to any of the named AF_xxxxx patterns or c, will return % even when not known on this system.xnetworkConvert  to .ynetworkDefault port number. defaultPort0znetwork4Is the socket address type supported on this system?networkUse a + with a function requiring a pointer to a  and the length of that .networkWrite the given  to the given memory location.networkRead a  from the given memory location.{network 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.|networkConverts IPv4 quadruple to .}network Converts , to representation-independent IPv6 octuple.~networkConverts IPv6 octuple to .networkZero a structure.dcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!lkjihgfe mnopqrstuvwxyz{|}~None #$<network,Network interface ID and local IPv4 address.network,Network interface ID and local IPv4 address.networkTraffic class of IPv6.network TOS of IPv4.networkHop limit of IPv6.networkTime to live of IPv4.networkControl message type class. Each control message type has a numeric  and a  data representation.network/Identifier of control message (ancillary data).networkControl message (ancillary data) including a pair of level and type.networkThe identifier for .networkThe identifier for .networkThe identifier for .networkThe identifier for .networkThe identifier for .networkThe identifier for .networkThe identifier for .networkUnsupported identifiernetworkLocate a control message of the given type in a list of control messages. The following shows an example usage: (lookupCmsg CmsgIdIPv4TOS cmsgs >>= decodeCmsg) :: Maybe IPv4TOSnetworkFiltering control message.#"(c) The University of Glasgow 20012BSD-style (see the file libraries/network/LICENSE)libraries@haskell.org provisionalportableNoneH network Throw an  corresponding to the current socket error if the IO action returns a result of -1, but retries in case of an interrupted operation. Discards the result of the IO action after error handling.network Throw an  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.network Throw an  corresponding to the current socket error if the IO action returns a result of -13, but retries in case of an interrupted operation.network Throw an  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.network Throw an + corresponding to the current socket error.networkLike 0, but the error code is supplied as an argument.?On Windows, do not use errno. Use a system error code instead.networkLike  , but if the action fails with  EWOULDBLOCK or similar, wait for the socket to be read-ready, and try again.networkLike  , but if the action fails with  EWOULDBLOCK or similar, wait for the socket to be read-ready, and try again. If it fails with the error the user was expecting then ignore the errornetworkLike  , but if the action fails with  EWOULDBLOCK or similar, wait for the socket to be write-ready, and try again.networkWith older versions of the network library (version 2.6.0.2 or earlier) on Windows operating systems, the networking subsystem must be initialised using 2 before any networking operations can be used. eg. main = withSocketsDo $ do {...}It is fine to nest calls to -, and to perform networking operations after  has returned. is not necessary for the current network library. However, for compatibility with older versions on Windows, it is good practice to always call  (it's very cheap).network#textual description of the locationnetworkthe  operation to be executednetwork#textual description of the locationnetworkaction to execute before retrying if an immediate retry would blocknetworkthe  operation to be executednetwork#textual description of the locationnetworkthe  operation to be executednetwork#textual description of the locationnetworkthe  operation to be executednetwork)textual description of the error location  NoneHH NoneHxNone#$&P 'networkSocket options for use with  and .The existence of a constructor does not imply that the relevant option is supported on your system: see network,Receiving IPV6_PKTINFO (struct in6_pktinfo).networkReceiving IPv6 traffic class.networkReceiving IPv6 hop limit.network'IPV6_V6ONLY: don't use this on OpenBSD.network)Receiving IP_PKTINFO (struct in_pktinfo).networkReceiving IPv4 TOS.networkReceiving IPv4 TTL.networkIP_TTLnetworkTCP_CORKnetworkTCP_USER_TIMEOUTnetwork TCP_NODELAYnetwork TCP_MAXSEGnetworkSO_USELOOPBACKnetwork/SO_SNDTIMEO: this does not work at this moment.network/SO_RCVTIMEO: this does not work at this moment.network SO_SNDLOWATnetwork SO_RCVLOWATnetwork SO_REUSEPORTnetwork:SO_LINGER: timeout in seconds, 0 means disabling/disabled.network SO_OOBINLINEnetwork SO_KEEPALIVEnetwork SO_RCVBUFnetwork SO_SNDBUFnetwork SO_BROADCASTnetwork SO_DONTROUTEnetworkSO_ERRORnetworkSO_PROTOCOL, read-onlynetworkSO_TYPE, read-onlynetworkSO_DOMAIN, read-onlynetwork SO_REUSEADDRnetworkSO_DEBUGnetwork Does the  exist on this system?networkGet the  of an active socket.Since: 3.0.1.0networkExecute the given action only when the specified socket option is supported. Any return value is ignored.networkSet a socket option that expects an Int value. There is currently no API to set e.g. the timeval socket optionsnetworkSet a socket option.networkGet a socket option that gives an Int value. There is currently no API to get e.g. the timeval socket optionsnetworkGet a socket option.network Option Levelnetwork Option Name*NoneWnetworkCreate a new socket using the given address family, socket type and protocol number. The address family is usually `, _, or a. The socket type is usually i or h". The protocol number is usually u. If _ is used and the socket type is i or h, the  socket option is set to 0 so that both IPv4 and IPv6 can be handled with one socket.import Network.Socketlet hints = defaultHints { addrFlags = [AI_NUMERICHOST, AI_NUMERICSERV], addrSocketType = Stream }addr:_ <- getAddrInfo (Just hints) (Just "127.0.0.1") (Just "5000")sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)+Network.Socket.bind sock (addrAddress addr)getSocketName sock127.0.0.1:5000networkBind 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 y is passed then the system assigns the next available use port.network&Connect to a remote socket at address.networkListen 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).networkAccept a connection. The socket must be bound to an address and listening for connections. The return value is a pair (conn, address) where conn is a new socket object usable to send and receive data on the connection, and address is the address bound to the socket on the other end of the connection. On Unix, FD_CLOEXEC is set to the new  . NoneX0networkGetting peer's socket address.networkGetting my socket address.networkGetting the port of socket. & is thrown if a port is not available.networkGetting the port of socket.None#$pVnetwork-Flags that control the querying behaviour of . For more information, see +https://tools.ietf.org/html/rfc3493#page-30networkResolve 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.network;If the hostname cannot be looked up, an IO error is thrown.network>If a host is local, return only the hostname part of the FQDN.networkThe 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.networkThe name of the service is not looked up. Instead, a numeric representation of the service is returned.network-Flags that control the querying behaviour of . For more information, see +https://tools.ietf.org/html/rfc3493#page-25networkThe 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.)networkIf  is specified, return all matching IPv6 and IPv4 addresses. Otherwise, this flag has no effect. (Only some platforms support this.)networkThe  field of the first returned / will contain the "canonical name" of the host.networkThe  argument must be a numeric address in string form, and network name lookups will not be attempted.networkThe  argument must be a port number in string form, and service name lookups will not be attempted. (Only some platforms support this.)networkIf 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.networkIf an IPv6 lookup is performed, and no IPv6 addresses are found, IPv6-mapped IPv4 addresses will be returned. (Only some platforms support this.)networkEither a service name e.g., "http" or a numeric port number.networkEither a host name e.g.,  "haskell.org" or a numeric host address string consisting of a dotted decimal IPv4 address or an IPv6 address e.g.,  "192.168.0.1".networkIndicate whether the given & will have any effect on this system.network&Default hints for address lookup with .addrFlags defaultHints[]addrFamily defaultHints AF_UNSPECaddrSocketType defaultHints NoSocketTypeaddrProtocol defaultHints0network>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:let 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  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.Note: the order of arguments is slightly different to that defined for  getaddrinfo in RFC 2553. The ; parameter comes first to make partial application easier.addr:_ <- getAddrInfo (Just hints) (Just "127.0.0.1") (Just "http")addrAddress addr 127.0.0.1:80networkResolve an address to a host or service name. This function is protocol independent. The list of ! values controls query behaviour.If 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.addr:_ <- getAddrInfo (Just defaultHints) (Just "127.0.0.1") (Just "http")getNameInfo [NI_NUMERICHOST, NI_NUMERICSERV] True True $ addrAddress addr(Just "127.0.0.1",Just "80")networkPack 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.network'Unpack a bitmask into a list of values.networkShow an IPv6 address in the most appropriate notation, based on recommended representation proposed by  "http://tools.ietf.org/html/rfc5952RFC 5952./The implementation is completely compatible with the current implementation of the  inet_ntop function in glibc./network)A utility function to open a socket with 1. This is a just wrapper for the following code: \addr -> socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)network!preferred socket type or protocolnetworkhost name to look upnetworkservice name to look upnetwork%resolved addresses, with "best" firstnetwork!flags to control lookup behaviournetworkwhether to look up a hostnamenetwork!whether to look up a service namenetworkthe address to look up*NonesWnetworkTurns 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 .Caveat  is not recommended for network programming in Haskell, e.g. merely performing hClose. on a TCP socket won't cooperate with peer's  gracefulClose, i.e. proper shutdown sequence with appropriate handshakes specified by the protocol.(c) Johan Tibell 2007-2010 BSD-stylejohan.tibell@gmail.comstableportableNonesNone~networkSend 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.networkSend 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.networkReceive 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.0If the first return value is zero, it means EOF.For i3 sockets, the second return value would be invalid.NOTE: blocking on Windows unless you compile with -threaded (see GHC ticket #1129)networkReceive 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.The return value is the length of received data. Zero means EOF. Historical note: Version 2.8.x.y or earlier, an EOF error was thrown. This was changed in version 3.0.networkReceive data from the socket. This function returns immediately even if data is not available. In other words, IO manager is NOT involved. The length of data is returned if received. -1 is returned in the case of EAGAIN or EWOULDBLOCK. -2 is returned in other error cases.network)Send data to the socket using sendmsg(2).networkReceive data from the socket using recvmsg(2). The supplied buffers are filled in order, with subsequent buffers used only after all the preceding buffers are full. If the message is short enough some of the supplied buffers may remain unused.networkSocketnetworkDestination addressnetworkData to be sentnetworkControl messagesnetwork Message flagsnetworkThe length actually sentnetworkSocketnetworkA list of (buffer, buffer-length) pairs. If the total length is not large enough,  is returnednetworkThe buffer size for control messages. If the length is not large enough,  is returnednetwork Message flagsnetworkSource address, total bytes received, control messages and message flagsNonew networkGetting peer's .network Getting my .network&Connect to a remote socket at address.networkBind the socket to an address. The socket must not already be bound. The  passed to bind% must be the same as that passed to socket. If the special port number y is passed then the system assigns the next available use port.networkAccept a connection. The socket must be bound to an address and listening for connections. The return value is a pair (conn, address) where conn is a new socket object usable to send and receive data on the connection, and address is the address bound to the socket on the other end of the connection. On Unix, FD_CLOEXEC is set to the new  .networkSend 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.networkReceive 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.0If the first return value is zero, it means EOF.For i3 sockets, the second return value would be invalid.NOTE: blocking on Windows unless you compile with -threaded (see GHC ticket #1129)network)Send data to the socket using sendmsg(2).network.Receive data from the socket using recvmsg(2).networkSocketnetworkDestination addressnetworkData to be sentnetworkControl messagesnetwork Message flagsnetworkThe length actually sentnetworkSocketnetworkA list of a pair of buffer and its size. If the total length is not large enough,  is returnednetworkThe buffer size for control messages. If the length is not large enough,  is returnednetwork Message flagsnetworkSource address, received data, control messages and message flags NonenetworkShut 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.networkClosing a socket gracefully. This sends TCP FIN and check if TCP FIN is received from the peer. The second argument is time out to receive TCP FIN in millisecond. In both normal cases and error cases, socket is deallocated finally.Since: 3.1.1.0(c) Johan Tibell 2007-2010 BSD-stylejohan.tibell@gmail.comstableportableNone #$n networkSend 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.networkSend 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.networkSend 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.networkSend 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.networkSend 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.networkSend 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.networkReceive 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.For TCP sockets, a zero length return value means the peer has closed its half side of the connection.networkReceive 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.0If the first return value is zero, it means EOF.network)Send data to the socket using sendmsg(2).network.Receive data from the socket using recvmsg(2). networkConnected socketnetwork Data to sendnetworkNumber of bytes sentnetworkConnected socketnetwork Data to sendnetworkSocketnetwork Data to sendnetworkRecipient addressnetworkNumber of bytes sentnetworkSocketnetwork Data to sendnetworkRecipient addressnetworkConnected socketnetwork Data to sendnetworkSocketnetwork Data to sendnetworkRecipient addressnetworkConnected socketnetwork"Maximum number of bytes to receivenetwork Data receivednetworkSocketnetwork"Maximum number of bytes to receivenetwork Data received and sender addressnetworkSocketnetworkDestination addressnetworkData to be sentnetworkControl messagesnetwork Message flagsnetworkThe length actually sentnetworkSocketnetworkThe maximum length of data to be received If the total length is not large enough,  is returnednetworkThe buffer size for control messages. If the length is not large enough,  is returnednetwork Message flagsnetworkSource address, received data, control messages and message flagsNone InetworkConnected socketnetwork Data to sendnetworkNumber of bytes sentnetworkConnected socketnetwork Data to send(c) Johan Tibell 2007-2010 BSD-stylejohan.tibell@gmail.comstableportableNone networkSend 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.networkSend 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.networkReceive 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.  Nonee NonenetworkGetting 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 , only separately created and then explicitly connected UNIX-domain sockets work on such systems.Since 2.7.0.0.networkReturns the processID, userID and groupID of the peer of a UNIX-domain socket.5Only available on platforms that support SO_PEERCRED.networkReturns the userID and groupID of the peer of a UNIX-domain socket.6Only available on platforms that support getpeereid().network1Whether or not UNIX-domain sockets are available.Since 2.7.0.0.networkSend a file descriptor over a UNIX-domain socket. Use this function in the case where  is .networkReceive a file descriptor over a UNIX-domain socket. Note that the resulting file descriptor may have to be put into non-blocking mode in order to be used safely. See  ). Use this function in the case where  is .networkBuild a pair of connected socket objects. For portability, use this function in the case where  is  and specify a to the first argument."(c) The University of Glasgow 20012BSD-style (see the file libraries/network/LICENSE)libraries@haskell.org provisionalportableNone  dcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!lkjihgfe mnopqrstuvwxyz{|}~st pnoqmrlkjihgfelkjihgfevdcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!dcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!wxuz{|}~y    (c) Bryan O'Sullivan 2009 BSD-stylebos@serpentine.com experimental POSIX, GHCNoneunetworkReceive 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.networkReceive 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 .networkConnected socketnetwork Data receivednetworkConnected socketnetwork"Maximum number of bytes to receivenetwork Data received!"#$%&'()* + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X 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 x y z { | } ~                                       #                                            &network-3.1.2.1-I09Sy6M5CNJIMsILXCwpAoNetwork.SocketNetwork.Socket.AddressNetwork.Socket.InternalNetwork.Socket.ByteStringNetwork.Socket.ByteString.LazyNetwork.Socket.ImportsNetwork.Socket.IfNetwork.Socket.FlagNetwork.Socket.CbitsNetwork.Socket.FcntlNetwork.Socket.Posix.IOVecNetwork.Socket.ReadShowNetwork.Socket.TypesSystem.Posix.IOdupNetwork.Socket.Posix.CmsgNetwork.Socket.Posix.MsgHdrNetwork.Socket.Posix.CmsgHdrNetwork.Socket.OptionsNetwork.Socket.SyscallNetwork.Socket.NameNetwork.Socket.InfoNetwork.Socket.Handle System.IOhClose"Network.Socket.ByteString.InternalNetwork.Socket.BufferNetwork.Socket.SockAddrNetwork.Socket.ShutdownNetwork.Socket.ByteString.IO$Network.Socket.ByteString.Lazy.PosixNetwork.Socket.Unix ifNameToIndex ifIndexToNameMsgFlag MSG_WAITALL MSG_CTRUNC MSG_TRUNCMSG_EORMSG_PEEK MSG_DONTROUTEMSG_OOBmaxListenQueuesetNonBlockIfNeededsetCloseOnExecIfNeededgetCloseOnExec getNonBlock HostAddress6 HostAddressSockAddr SockAddrInet SockAddrInet6 SockAddrUnixScopeIDFlowInfo SocketAddresssizeOfSocketAddresspeekSocketAddresspokeSocketAddress PortNumberFamily packFamily SocketTypeProtocolNumberSocketAF_CAN AF_BLUETOOTH AF_WANPIPEAF_PPPOXAF_IRDA AF_ATMSVC AF_ECONETAF_ASH AF_PACKET AF_SECURITY AF_NETBEUIAF_ROSE AF_ATMPVC AF_BRIDGE AF_NETROMAF_RIFAF_RAWAF_LINKAF_ENCAPPseudo_AF_HDRCMPLTAF_ARPAF_NATM Pseudo_AF_KEYAF_ISDNAF_SIP Pseudo_AF_PIPPseudo_AF_RTIPAF_CNTAF_COIPAF_INTFAF_NDD AF_NETWAREAF_SDLAF_WANAF_CTF Pseudo_AF_XTPAF_IPX AF_GOSSIP AF_OSINETAF_AX25AF_X25 AF_NETMANAF_OSIAF_ISOAF_802AF_NIT AF_NETBIOSAF_ROUTE AF_APPLETALK AF_HYLINKAF_LATAF_DLI AF_DECnetAF_SNAAF_CCITT AF_DATAKITAF_ECMAAF_NBSAF_NSAF_CHAOSAF_PUP AF_IMPLINKAF_INET6AF_INETAF_UNIX AF_UNSPECUnsupportedFamily GeneralFamily SeqPacketRDMRawDatagramStream NoSocketTypeUnsupportedSocketTypeGeneralSocketTypefdSocketunsafeFdSocket touchSocket withFdSocket socketToFdmkSocketcloseclose'defaultProtocolisSupportedSocketTypeisSupportedFamily unpackFamily defaultPortisSupportedSockAddrhostAddressToTupletupleToHostAddresshostAddress6ToTupletupleToHostAddress6 zeroMemory IPv6PktInfo IPv4PktInfo IPv6TClassIPv4TOS IPv6HopLimitIPv4TTLControlMessagecontrolMessageIdCmsgIdCmsgcmsgIdcmsgDataCmsgIdFdCmsgIdIPv6PktInfoCmsgIdIPv4PktInfoCmsgIdIPv6TClass CmsgIdIPv4TOSCmsgIdIPv6HopLimit CmsgIdIPv4TTLUnsupportedCmsgId lookupCmsg filterCmsg encodeCmsg decodeCmsgthrowSocketErrorIfMinus1Retry_%throwSocketErrorIfMinus1RetryMayBlockthrowSocketErrorIfMinus1RetrythrowSocketErrorIfMinus1_throwSocketErrorthrowSocketErrorCodethrowSocketErrorWaitReadthrowSocketErrorWaitReadButthrowSocketErrorWaitWrite withSocketsDo SocketOptionSockOptRecvIPv6PktInfoRecvIPv6TClassRecvIPv6HopLimitIPv6OnlyRecvIPv4PktInfo RecvIPv4TOS RecvIPv4TTL TimeToLiveCork UserTimeoutNoDelay MaxSegment UseLoopBack SendTimeOut RecvTimeOut SendLowWater RecvLowWater ReusePortLinger OOBInline KeepAlive RecvBuffer SendBuffer Broadcast DontRouteSoError SoProtocolTypeSoDomain ReuseAddrDebugUnsupportedSocketOptionisSupportedSocketOption getSocketType whenSupportedsetSocketOption setSockOptgetSocketOption getSockOptsocketbindconnectlistenaccept getPeerName getSocketName socketPortsocketPortSafe 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 ServiceNameHostNameaddrInfoFlagImplemented defaultHints getAddrInfo getNameInfo openSocketsocketToHandle sendBufTosendBuf recvBufFromrecvBuf sendBufMsg recvBufMsg ShutdownCmdShutdownReceive ShutdownSend ShutdownBothshutdown gracefulClosesendsendAllsendTo sendAllTosendMany sendManyTorecvrecvFromsendMsgrecvMsggetPeerCredentialisUnixDomainSocketAvailablesendFdrecvFd socketPair getContentsbaseGHC.Base++GHC.Listfilterzipmap Control.Monadguardjoin GHC.FloatFloatinglog1mexplog1pexpexpm1log1patanhacoshasinhtanhcoshsinhatanacosasintancossinlogBase**sqrtlogpiexpMonadreturn>>=>>Functor<$fmapghc-prim GHC.ClassesOrd<<=>maxmin>=compareControl.Monad.Fail MonadFailfail Applicative<*liftA2*>pure<*> Data.Foldableelemminimummaximumfoldr1productsumfoldl1foldl'nullfoldlfoldrlengthData.TraversablemapMsequence<>Monoidmconcatmemptymappend GHC.TypesIntGHC.IntInt8Int16Int32Int64 GHC.MaybeMaybeNothingJustOrderingGTLTEQWordGHC.WordWord8Word16Word32Word64GHC.PtrPtrFunPtrmfilter<$!>unless replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterM Data.ListisSubsequenceOf mapAccumR mapAccumLforMControl.Applicativeoptional WrappedMonad WrapMonad unwrapMonad WrappedArrow WrapArrow unwrapArrowZipList getZipListForeign.C.StringwithCWStringLen withCWStringnewCWStringLen newCWStringpeekCWStringLen peekCWStringwithCAStringLen withCAStringnewCAStringLen newCAStringpeekCAStringLen peekCAStringcastCharToCSCharcastCSCharToCharcastCharToCUCharcastCUCharToCharcastCharToCCharcastCCharToCharcharIsRepresentablewithCStringLen withCString newCStringLen newCStringpeekCStringLen peekCStringCString CStringLenCWString CWStringLenData.Functor.ConstConstgetConstfindnotElem minimumBy maximumByallanyorand concatMapconcatmsum sequence_forM_mapM_ Data.MonoidFirstgetFirstLastgetLastApgetApData.Semigroup.InternalDualgetDualEndoappEndoAllgetAllAnygetAnySumgetSumProduct getProductAltgetAlt Data.OldListunwordswordsunlineslinesunfoldrsortOnsortBysort permutations subsequencestailsinitsgroupBygroupdeleteFirstsByunzip7unzip6unzip5unzip4zipWith7zipWith6zipWith5zipWith4zip7zip6zip5zip4genericReplicate genericIndexgenericSplitAt genericDrop genericTake genericLengthinsertByinsert partition transpose intercalate intersperse intersectBy intersectunionByunion\\deleteBydeletenubBynub isInfixOf isSuffixOf isPrefixOf findIndices findIndex elemIndices elemIndex stripPrefix dropWhileEndData.Ord comparingDowngetDownForeign.C.TypesCCharCSCharCUCharCShortCUShortCIntCUIntCLongCULongCLLongCULLongCBoolCFloatCDoubleCPtrdiffCSizeCWchar CSigAtomicCClockCTime CUSeconds CSUSecondsCFileCFposCJmpBufCIntPtrCUIntPtrCIntMaxCUIntMax Foreign.Ptr intPtrToPtr ptrToIntPtr wordPtrToPtr ptrToWordPtrfreeHaskellFunPtrWordPtrIntPtrForeign.StorableStorablepokepeek pokeByteOff peekByteOff pokeElemOff peekElemOffsizeOf alignmentcastPtrToFunPtrcastFunPtrToPtr castFunPtr nullFunPtrminusPtralignPtrplusPtrcastPtrnullPtrNumericshowOctshowHex showIntAtBase showHFloat showGFloatAlt showFFloatAlt showGFloat showFFloat showEFloatshowInt readSigned readFloatreadHexreadDecreadOctreadIntGHC.Read lexDigitsfromRat floatToDigits showFloat bitReverse64 bitReverse32 bitReverse16 bitReverse8 byteSwap64 byteSwap32 byteSwap16 Data.BitstoIntegralSizedpopCountDefaulttestBitDefault bitDefaultBitspopCountrotateRrotateL unsafeShiftRshiftR unsafeShiftLshiftLisSignedbitSize bitSizeMaybetestBit complementBitclearBitsetBitbitzeroBitsrotateshift complementxor.&..|. FiniteBitscountTrailingZeros finiteBitSizecountLeadingZerosGHC.Real showSignedunzip3unzipzipWith3zipWithzip3!!lookupreversebreakspansplitAtdroptake dropWhile takeWhilecycle replicaterepeatiterate'iteratescanr1scanrscanl'scanl1scanlfoldl1'initlasttailunconshead Data.MaybemapMaybe catMaybes listToMaybe maybeToList fromMaybefromJust isNothingisJustmaybe Data.Functorvoid<$>apliftM5liftM4liftM3liftM2liftMwhen=<<liftA3liftA<**> Alternativemanysomeempty<|> MonadPlusmzeromplus fromMsgFlagfGetFdfGetFl fdCloexec oNonBlock sockNonBlock sockCloexecFalse c_fcntl_read withIOVecIOVeciovBaseiovLeneqFsteqSnd lookBetween namePrefixdefShowdefRead_showInt_readIntsafeInt showIntInt readIntInt BijectionPair expectPrefix bijectiveShow bijectiveReadapp_precIn6AddrntohlhtonlSystem.Posix.TypesFdTrue withSockAddr pokeSockAddr peekSockAddrpackSocketTypec_closeinvalidateSocketunpackSocketTypewithSocketAddresswithNewSocketAddresscmsgType cmsgLevelcmsgIdBijectionGHC.IO.ExceptionIOErrorIOMsgHdrmsgName msgNameLenmsgIov msgIovLenmsgCtrl msgCtrlLenmsgFlags withCmsgs parseCmsgs CustomSockOpt c_accept4c_listen c_connectc_bindc_socket connectLooppackBits unpackBitsshowHostAddress6 c_getnameinfoc_gai_strerrorc_freeaddrinfo c_getaddrinfo aiFlagMapping niFlagMappingfollowAddrInfo gai_strerror withCStringIfshowHostAddressGHC.IO.Handle.TypesHandle GHC.IO.Handle hSetBuffering c_recvmsg c_sendmsgc_writevmkInvalidRecvArgError recvBufNoWaitbytestring-0.10.10.0Data.ByteString.Internal ByteString waitWhen0 getPeerCred getPeerEidData.ByteString.Lazy.Internal