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

Client WebSocket init options. More...

Public Member Functions

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

Properties

TimeSpan KeepAliveInterval [get, set]
 How often to send ping requests to the Server This is done to prevent proxy servers from closing your connection The default is TimeSpan.Zero meaning that it is disabled. WebSocket servers usually send ping messages so it is not normally necessary for the client to send them (hence the TimeSpan.Zero default) You can manually control ping pong messages using the PingPongManager class. If you do that it is advisible to set this KeepAliveInterval to zero for the WebSocketClientFactory.
 
bool NoDelay [get, set]
 Set to true to send a message immediately with the least amount of latency (typical usage for chat) This will disable Nagle's algorithm which can cause high tcp latency for small packets sent infrequently However, if you are streaming large packets or sending large numbers of small packets frequently it is advisable to set NoDelay to false This way data will be bundled into larger packets for better throughput.
 
Dictionary< string, string > AdditionalHttpHeaders [get, set]
 Add any additional http headers to this dictionary.
 
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 SecWebSocketExtensions [get, set]
 WebSocket Extensions as an HTTP header value.
 
string SecWebSocketProtocol [get, set]
 A comma separated list of sub protocols in preference order (first one being the most preferred) The server will return the first supported sub protocol (or none if none are supported) Can be null.
 

Detailed Description

Client WebSocket init options.

Constructor & Destructor Documentation

◆ WebSocketClientOptions()

Nakama.Ninja.WebSockets.WebSocketClientOptions.WebSocketClientOptions ( )
inline

Initialises a new instance of the WebSocketClientOptions class.

Property Documentation

◆ AdditionalHttpHeaders

Dictionary<string, string> Nakama.Ninja.WebSockets.WebSocketClientOptions.AdditionalHttpHeaders
getset

Add any additional http headers to this dictionary.

◆ IncludeExceptionInCloseResponse

bool Nakama.Ninja.WebSockets.WebSocketClientOptions.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.WebSocketClientOptions.KeepAliveInterval
getset

How often to send ping requests to the Server This is done to prevent proxy servers from closing your connection The default is TimeSpan.Zero meaning that it is disabled. WebSocket servers usually send ping messages so it is not normally necessary for the client to send them (hence the TimeSpan.Zero default) You can manually control ping pong messages using the PingPongManager class. If you do that it is advisible to set this KeepAliveInterval to zero for the WebSocketClientFactory.

◆ NoDelay

bool Nakama.Ninja.WebSockets.WebSocketClientOptions.NoDelay
getset

Set to true to send a message immediately with the least amount of latency (typical usage for chat) This will disable Nagle's algorithm which can cause high tcp latency for small packets sent infrequently However, if you are streaming large packets or sending large numbers of small packets frequently it is advisable to set NoDelay to false This way data will be bundled into larger packets for better throughput.

◆ SecWebSocketExtensions

string Nakama.Ninja.WebSockets.WebSocketClientOptions.SecWebSocketExtensions
getset

WebSocket Extensions as an HTTP header value.

◆ SecWebSocketProtocol

string Nakama.Ninja.WebSockets.WebSocketClientOptions.SecWebSocketProtocol
getset

A comma separated list of sub protocols in preference order (first one being the most preferred) The server will return the first supported sub protocol (or none if none are supported) Can be null.


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