Running a TCP server with an accepted socket and its peer name.
Modulenetwork-run-0.4.4Haskell2010
Network.Run.TCP
Simple functions to run TCP clients and servers.
- 1 type
- 14 values
- Packagenetwork-run-0.4.4
- Exports15
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceTCP.hs
Server
6 declarationsRunning a TCP client with a connected socket for a given listen socket.
Open socket for server use, and set the provided options before binding.
This is equivalent to
openTCPServerSocketWithOpts . map (second SockOptValue)
Open socket for server use, and set the provided options before binding.
In addition to the given options, the socket is configured to
allow reuse of local addresses (SO_REUSEADDR)
automatically be closed during a successful
execve(FD_CLOEXEC)bind to the address specified
listen with queue length with 1024
Client
9 declarationsRunning a TCP client with a connected socket.
This is the same as:
runTCPClientWithSettings defaultSettings
Settings for client.
Default settings.
Opening a socket. Use openClientSocketWithOptions to specify SocketOption
Selecting AddrInfo.
Running a TCP client with a connected socket.
This is the same as
openClientSocketWithOptions []
Open a client socket with the given options
The options are set before connect. This is equivalent to
openClientSocketWithOpts . map (second SockOptValue)
Open a client socket with the given options
This must be used rather than openClientSocketWithOptions for options such as Linger which require a composite value (StructLinger).
The options are set before connect.