Node.Net.Server
- Package
- purescript-node-net
- Repository
- purescript-node/purescript-node-net
#ListenOptions Source
data ListenOptions
Options 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 ServerOptions
Options to configure the basics of a Server
.
#createServer Source
createServer :: Options ServerOptions -> (Socket -> Effect Unit) -> Effect Server
Creates 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 listen
s to.
#listenBacklog Source
listenBacklog :: Option ListenOptions Int
Maximum number of pending connections.
Defaults to 511
.
#listenExclusive Source
listenExclusive :: Option ListenOptions Boolean
When 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 String
The host to configure TCP Server
s.
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 Boolean
When true
, only binds to IPv6 hosts and not also to IPv4 hosts.
Defaults to false
.
#listenPath Source
listenPath :: Option ListenOptions String
The path to configure ICP Server
s.
Determines the ICP endpoint the Server
will attempt to listen on.
#listenPort Source
listenPort :: Option ListenOptions Int
The port to configure TCP Server
s.
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 Boolean
Makes the ICP pipe readable for all users.
Defaults to false
.
#listenWritableAll Source
listenWritableAll :: Option ListenOptions Boolean
Makes the ICP pipe writable for all users.
Defaults to false
.
#serverAllowHalfOpen Source
serverAllowHalfOpen :: Option ServerOptions Boolean
Allows half open TCP connections.
Defaults to false
.
#serverPauseOnConnect Source
serverPauseOnConnect :: Option ServerOptions Boolean
When true
, pauses the Socket
on incomming connections.
Defaults to false
.
- Modules
- Node.
Net - Node.
Net. Server - Node.
Net. Socket