Jaa


WebSocketClient Constructor

Definition

Initializes a new instance of the WebSocketClient class.

public WebSocketClient (System.Net.WebSockets.WebSocket socket, string url, Microsoft.Bot.Streaming.RequestHandler requestHandler, TimeSpan? closeTimeOut = default, TimeSpan? keepAlive = default, Microsoft.Extensions.Logging.ILogger logger = default);
new Microsoft.Bot.Connector.Streaming.Application.WebSocketClient : System.Net.WebSockets.WebSocket * string * Microsoft.Bot.Streaming.RequestHandler * Nullable<TimeSpan> * Nullable<TimeSpan> * Microsoft.Extensions.Logging.ILogger -> Microsoft.Bot.Connector.Streaming.Application.WebSocketClient
Public Sub New (socket As WebSocket, url As String, requestHandler As RequestHandler, Optional closeTimeOut As Nullable(Of TimeSpan) = Nothing, Optional keepAlive As Nullable(Of TimeSpan) = Nothing, Optional logger As ILogger = Nothing)

Parameters

socket
WebSocket

The client web socket to initiate streaming connection to a server.

url
String

The server URL to connect to.

requestHandler
RequestHandler

Handler that will receive incoming requests to this client instance.

closeTimeOut
Nullable<TimeSpan>

Optional time out for closing the client connection.

keepAlive
Nullable<TimeSpan>

Optional spacing between keep alives for proactive disconnection detection. If null is provided, no keep alives will be sent.

logger
ILogger

ILogger for the client.

Applies to