Node.Net.Server
- Package
- purescript-node-net
- Repository
- purescript-node/purescript-node-net
#ListenOptions Source
data ListenOptionsOptions to configure the listening side of a Server.
These options decide whether the Server is ICP or TCP.
One of path or port must be set.
Setting path will make the Server ICP.
Setting port will make the Server TCP.
#ServerOptions Source
data ServerOptionsOptions to configure the basics of a Server.
#createServer Source
createServer :: Options ServerOptions -> (Socket -> Effect Unit) -> Effect ServerCreates an ICP or TCP Server, returns the Server,
and adds the callback as a listenter for the 'connection' event.
the Server will be ICP or TCP depending on what it listens to.
#listenBacklog Source
listenBacklog :: Option ListenOptions IntMaximum number of pending connections.
Defaults to 511.
#listenExclusive Source
listenExclusive :: Option ListenOptions BooleanWhen true, the handle cannot be shared and will result in an error.
When false, the handle can be shared.
Defaults to false.
#listenHost Source
listenHost :: Option ListenOptions StringThe host to configure TCP Servers.
Determines the host the Server will attempt to listen on.
Defaults to IPv6 :: if available, and IPv4 0.0.0.0 otherwise.
#listenIpv6Only Source
listenIpv6Only :: Option ListenOptions BooleanWhen true, only binds to IPv6 hosts and not also to IPv4 hosts.
Defaults to false.
#listenPath Source
listenPath :: Option ListenOptions StringThe path to configure ICP Servers.
Determines the ICP endpoint the Server will attempt to listen on.
#listenPort Source
listenPort :: Option ListenOptions IntThe port to configure TCP Servers.
Determines the TCP endpoint the Server will attempt to listen on.
When 0, the OS will assign an arbitrary port.
#listenReadableAll Source
listenReadableAll :: Option ListenOptions BooleanMakes the ICP pipe readable for all users.
Defaults to false.
#listenWritableAll Source
listenWritableAll :: Option ListenOptions BooleanMakes the ICP pipe writable for all users.
Defaults to false.
#serverAllowHalfOpen Source
serverAllowHalfOpen :: Option ServerOptions BooleanAllows half open TCP connections.
Defaults to false.
#serverPauseOnConnect Source
serverPauseOnConnect :: Option ServerOptions BooleanWhen true, pauses the Socket on incomming connections.
Defaults to false.
- Modules
- Node.
Net - Node.
Net. Server - Node.
Net. Socket