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.
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.
package socket-activation
a module for systemd socket activation.  See and for more details. Version
socketConnection :: BufferType ty => String -> Int -> Socket -> IO (HandleStream ty)
HTTP Network.TCP
socketConnection, like openConnection but using a pre-existing Socket.
package socketio
Socket.IO for Haskell folks. Socket.IO: Protocol: @ {-# LANGUAGE OverloadedStrings #-} import Web.SocketIO -- listens to port 4000 main = server 4000 $ do     -- ping pong     on "ping" $ emit "pong" []     -- reply :: CallbackM [Text]     on "echo" $ reply >>= emit "pong"     -- do some IO     on "Kim Jong-Un" $ liftIO launchMissile @ Version
socketMode :: FileMode
unix System.Posix.Files.ByteString, unix System.Posix.Files
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.
addrSocketType :: AddrInfo -> SocketType
network Network.Socket
bindSocket :: Socket -> SockAddr -> IO ()
network Network.Socket
Deprecated alias for bind.
package EventSocket
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
Get a socket option that gives an Int value. There is currently no API to get e.g. the timeval socket options

Show more results