-
Notifications
You must be signed in to change notification settings - Fork 85
WebSocketListener options
vtortola edited this page Mar 22, 2014
·
24 revisions
WebSocketListener accepts an object with several options:
-
PingTimeout (
TimeSpan
): The amount of time the WebSocket will wait without receiving a "ping" response ("pong"). "Pings" are sent with a PingTimeout/3 interval. Default: 5 seconds. -
NegotiationQueueCapacity (
Int32
): The amount of TCP connections that are accepted and queued before doing the WebSocket handshake. Default:Environment.ProcessorCount * 4
-
TcpBacklog (
Int32?
): The TCP backlog. Ifnull
it will use the platform default. Default:null
. -
ParallelNegotiations (
Int32
): The amount of parallel WebSocket handshakes that can be done. In some situations, like when using TLS, this process could be slower because it needs more round trips, and increment this value can improve the performance. Default:Environment.ProcessorCount * 2
. -
NegotiationTimeout (
TimeSpan
): The timeout for the WebSocket handshake. Default: 5 seconds. -
WebSocketSendTimeout (
TimeSpan
): The TCP send timeout. Default: 5 seconds. -
WebSocketReceiveTimeout (
TimeSpan
): The TCP receive timeout. Default: 5 seconds. -
SendBufferSize (
Int32
): The send buffer. Default: 8192. -
SubProtocols (
String[]
): The allowed sub protocols. If the client requests a sub protocol, the first match from the request and this collection will be used, if there is not match an exception will be thrown cancelling the handshake. DefaultString[0]
.