socket +network

socket :: Family -> SocketType -> ProtocolNumber -> IO Socket
network Network.Socket
Create a new socket using the given address family, socket type and protocol number. The address family is usually AF_INET, AF_INET6, or AF_UNIX. The socket type is usually Stream or Datagram. The protocol number is usually defaultProtocol. If AF_INET6 is used, the IPv6Only socket option is set to 0 so that both IPv4 and IPv6 can be handled with one socket.
socketPair :: Family -> SocketType -> ProtocolNumber -> IO (Socket, Socket)
network Network.Socket
Build 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 socket function above. Availability: Unix.
socketPort :: Socket -> IO PortID
network Network
Returns the PortID associated with a given socket.
socketPort :: Socket -> IO PortNumber
network Network.Socket
socketToHandle :: Socket -> IOMode -> IO Handle
network Network.Socket
Turns a Socket into an Handle. By default, the new handle is unbuffered. Use hSetBuffering to change the buffering. Note that since a Handle is automatically closed by a finalizer when it is no longer referenced, you should avoid doing any more operations on the Socket after calling socketToHandle. To close the Socket after socketToHandle, call hClose on the Handle.
module Network.Socket
network Network.Socket
The Network.Socket module is for when you want full control over sockets. Essentially the entire C socket API is exposed through this module; in general the operations follow the behaviour of the C functions of the same name (consult your favourite Unix networking book). A higher level interface to networking operations is provided through the module Network.
data Socket
network Network.Socket, network Network
data SocketOption
network Network.Socket
Socket options for use with setSocketOption and getSocketOption. The existence of a constructor does not imply that the relevant option is supported on your system: see isSupportedSocketOption
data SocketStatus
network Network.Socket
data SocketType
network Network.Socket
Socket Types. The existence of a constructor does not necessarily imply that that socket type is supported on your system: see isSupportedSocketType.
addrSocketType :: AddrInfo -> SocketType
network Network.Socket
bindSocket :: Socket -> SockAddr -> IO ()
network Network.Socket
Deprecated alias for bind.
fdSocket :: Socket -> CInt
network Network.Socket
getSocketName :: Socket -> IO SockAddr
network Network.Socket
getSocketOption :: Socket -> SocketOption -> IO Int
network Network.Socket
Get a socket option that gives an Int value. There is currently no API to get e.g. the timeval socket options
isSupportedSocketOption :: SocketOption -> Bool
network Network.Socket
Does the SocketOption exist on this system?
isSupportedSocketType :: SocketType -> Bool
network Network.Socket
Does the SOCK_ constant corresponding to the given SocketType exist on this system?
MkSocket :: CInt -> Family -> SocketType -> ProtocolNumber -> (MVar SocketStatus) -> Socket
network Network.Socket
mkSocket :: CInt -> Family -> SocketType -> ProtocolNumber -> SocketStatus -> IO Socket
network Network.Socket
NoSocketType :: SocketType
network Network.Socket
0, used in getAddrInfo hints, for example

Show more results