WebSocketClient Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
Optional spacing between keep alives for proactive disconnection detection. If null is provided, no keep alives will be sent.