socket +network

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
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.
data SocketOption
network Network.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
data SocketStatus
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.
data SocketType
network Network.Socket
Socket Types. This data type might have different constructors depending on what is supported by the operating system.
addrSocketType :: AddrInfo -> SocketType
network Network.Socket
bindSocket :: Socket -> SockAddr -> IO ()
network Network.Socket
Bind the socket to an address. The socket must not already be bound. The Family passed to bindSocket must be the same as that passed to socket. If the special port number aNY_PORT is passed then the system assigns the next available use port.
DummySocketOption__ :: SocketOption
network Network.Socket
fdSocket :: Socket -> CInt
network Network.Socket
getSocketName :: Socket -> IO SockAddr
network Network.Socket
getSocketOption :: Socket -> SocketOption -> IO Int
network Network.Socket
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
packSocketType :: SocketType -> CInt
network Network.Socket

Show more results