SocketServerOptions beta
Interface of @v12-engine/engine/server
export interface SocketServerOptionsWhat startSocketServer is started with: the port, the log and the limits and compression of its connections
Members
compress
compress?: boolean;Whether to compress what goes over connections whose other end can take it. Yes when left out
idleTimeout
idleTimeout?: number;Seconds a connection may say nothing before it is closed: it is pinged meanwhile, and a browser answers a ping by itself, so only one that is gone (a machine that vanished without closing) goes. 60 when left out
log
log?: Logger;Where it says what goes wrong with a connection. The root logger when left out
maxBuffered
maxBuffered?: number;Bytes waiting to go out to a connection, at most: one that takes what it is sent too slowly is closed, where it once queued in the server's memory without end. 16 MB when left out
maxConnections
maxConnections?: number;Connections open at once, at most: one more is answered 503 and never upgraded (RV38). 1024 when left out
maxMessage
maxMessage?: number;Characters a message may have at most: a longer one closes the connection. 64 KB when left out
onRequest
onRequest?: Parameters<typeof createServer>[1];What answers plain HTTP requests: a page saying what this is, by default
port
port: number;Port to listen on: 0 for any free one