Nakama .NET Client SDK 3.8.0
Nakama .NET Client SDK
|
Web socket server factory used to open web socket server connections. More...
Public Member Functions | |
WebSocketServerFactory () | |
Initialises a new instance of the WebSocketServerFactory class without caring about internal buffers. | |
WebSocketServerFactory (Func< MemoryStream > bufferFactory) | |
Initialises a new instance of the WebSocketClientFactory class with control over internal buffer creation. | |
async Task< WebSocketHttpContext > | ReadHttpHeaderFromStreamAsync (System.IO.Stream stream, CancellationToken token=default(CancellationToken)) |
Reads a http header information from a stream and decodes the parts relating to the WebSocket protocot upgrade. | |
async Task< WebSocket > | AcceptWebSocketAsync (WebSocketHttpContext context, CancellationToken token=default(CancellationToken)) |
Accept web socket with default options Call ReadHttpHeaderFromStreamAsync first to get WebSocketHttpContext. | |
async Task< WebSocket > | AcceptWebSocketAsync (WebSocketHttpContext context, WebSocketServerOptions options, CancellationToken token=default(CancellationToken)) |
Accept web socket with options specified Call ReadHttpHeaderFromStreamAsync first to get WebSocketHttpContext. | |
Web socket server factory used to open web socket server connections.
|
inline |
Initialises a new instance of the WebSocketServerFactory class without caring about internal buffers.
|
inline |
Initialises a new instance of the WebSocketClientFactory class with control over internal buffer creation.
bufferPool | Used to get a memory stream. Feel free to implement your own buffer pool. MemoryStreams will be disposed when no longer needed and can be returned to the pool. |
|
inline |
Accept web socket with default options Call ReadHttpHeaderFromStreamAsync first to get WebSocketHttpContext.
context | The http context used to initiate this web socket request |
token | The optional cancellation token |
Implements Nakama.Ninja.WebSockets.IWebSocketServerFactory.
|
inline |
Accept web socket with options specified Call ReadHttpHeaderFromStreamAsync first to get WebSocketHttpContext.
context | The http context used to initiate this web socket request |
options | The web socket options |
token | The optional cancellation token |
Implements Nakama.Ninja.WebSockets.IWebSocketServerFactory.
|
inline |
Reads a http header information from a stream and decodes the parts relating to the WebSocket protocot upgrade.
stream | The network stream |
token | The optional cancellation token |
Implements Nakama.Ninja.WebSockets.IWebSocketServerFactory.