Socket

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.
socketConnection :: BufferType ty => String -> Int -> Socket -> IO (HandleStream ty)
HTTP Network.TCP
socketConnection, like openConnection but using a pre-existing Socket.
socketMode :: FileMode
unix System.Posix.Files.ByteString, unix System.Posix.Files
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
package EventSocket
package
Interfaces with FreeSwitch Event Socket. This should be considered an alpha release and has not been tested extensively. Version 0.1
fdSocket :: Socket -> CInt
network Network.Socket
getSocketName :: Socket -> IO SockAddr
network Network.Socket
getSocketOption :: Socket -> SocketOption -> IO Int
network Network.Socket
package HandlerSocketClient
package
This package implemets API for a HandlerSocket client. Version 0.0.5

Show more results