Skip to content

WebSocketListener options

vtortola edited this page Mar 20, 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. If null 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.