WebSocketClient Class
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.
A client for use with the Bot Framework Protocol V3 with Streaming Extensions and an underlying WebSocket transport.
public class WebSocketClient : IDisposable, Microsoft.Bot.Streaming.Transport.IStreamingTransportClient
type WebSocketClient = class
interface IStreamingTransportClient
interface IDisposable
Public Class WebSocketClient
Implements IDisposable, IStreamingTransportClient
- Inheritance
-
WebSocketClient
- Implements
Constructors
WebSocketClient(String, RequestHandler, Object) |
Initializes a new instance of the WebSocketClient class. Throws ArgumentNullException if URL is null, empty, or whitespace. |
Properties
IsConnected |
Gets a value indicating whether or not this client is currently connected. |
LastMessageSendTime |
Gets the UTC time of the last send on this client. Made available for use when cleaning up idle clients. |
Methods
ConnectAsync() |
Establish a connection with no custom headers. |
ConnectAsync(IDictionary<String,String>) |
Establish a connection with optional custom headers. |
ConnectAsyncEx(IDictionary<String,String>, CancellationToken) |
Establish a connection with optional custom headers. |
Disconnect() |
Method used to disconnect this client. |
Dispose() |
Disconnects the client and releases any related objects owned by the class. |
Dispose(Boolean) |
Disposes objected used by the class. |
SendAsync(StreamingRequest, CancellationToken) |
Task used to send data over this client connection. Throws InvalidOperationException if called when the client is disconnected. Throws ArgumentNullException if message is null. |
Events
Disconnected |
An event to be fired when the underlying transport is disconnected. Any application communicating with this client should subscribe to this event. |