Nakama .NET Client SDK 3.8.0
Nakama .NET Client SDK
Loading...
Searching...
No Matches
Nakama.Ninja.WebSockets.WebSocketServerOptions Class Reference

Server WebSocket init options. More...

Public Member Functions

 WebSocketServerOptions ()
 Initialises a new instance of the WebSocketServerOptions class.
 

Properties

TimeSpan KeepAliveInterval [get, set]
 How often to send ping requests to the Client The default is 60 seconds This is done to prevent proxy servers from closing your connection A timespan of zero will disable the automatic ping pong mechanism You can manually control ping pong messages using the PingPongManager class. If you do that it is advisible to set this KeepAliveInterval to zero in the WebSocketServerFactory.
 
bool IncludeExceptionInCloseResponse [get, set]
 Include the full exception (with stack trace) in the close response when an exception is encountered and the WebSocket connection is closed The default is false.
 
string SubProtocol [get, set]
 Specifies the sub protocol to send back to the client in the opening handshake Can be null (the most common use case) The client can specify multiple preferred protocols in the opening handshake header The server should use the first supported one or set this to null if none of the requested sub protocols are supported.
 

Detailed Description

Server WebSocket init options.

Constructor & Destructor Documentation

◆ WebSocketServerOptions()

Nakama.Ninja.WebSockets.WebSocketServerOptions.WebSocketServerOptions ( )
inline

Initialises a new instance of the WebSocketServerOptions class.

Property Documentation

◆ IncludeExceptionInCloseResponse

bool Nakama.Ninja.WebSockets.WebSocketServerOptions.IncludeExceptionInCloseResponse
getset

Include the full exception (with stack trace) in the close response when an exception is encountered and the WebSocket connection is closed The default is false.

◆ KeepAliveInterval

TimeSpan Nakama.Ninja.WebSockets.WebSocketServerOptions.KeepAliveInterval
getset

How often to send ping requests to the Client The default is 60 seconds This is done to prevent proxy servers from closing your connection A timespan of zero will disable the automatic ping pong mechanism You can manually control ping pong messages using the PingPongManager class. If you do that it is advisible to set this KeepAliveInterval to zero in the WebSocketServerFactory.

◆ SubProtocol

string Nakama.Ninja.WebSockets.WebSocketServerOptions.SubProtocol
getset

Specifies the sub protocol to send back to the client in the opening handshake Can be null (the most common use case) The client can specify multiple preferred protocols in the opening handshake header The server should use the first supported one or set this to null if none of the requested sub protocols are supported.


The documentation for this class was generated from the following file: