Summary

A WebSocket client for connecting to external services.

Remarks

Events handlers will be called on the synchronization context that Connect was called on.

Constructors

WebSocket Initialized a new WebSocket client.

Properties

EnableCompression Enable or disable compression for the websocket. If the server supports it, compression will be enabled for all messages. Note: compression is disabled by default, and can be dangerous if you are sending secrets across the network.
IsConnected Returns true as long as a WebSocket connection is established.
SubProtocol Get the sub-protocol that was negotiated during the opening handshake.

Methods

AddSubProtocol Add a sub-protocol to be negotiated during the WebSocket connection handshake.
Connect Establishes a connection to an external WebSocket service.
Dispose Cleans up resources used by the WebSocket client. This will also immediately close the connection if it is currently open.
Send Sends a text message to the WebSocket server.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.