Interface IWebSocketClient
- Namespace
- DSharpPlus.Net.WebSocket
- Assembly
- DSharpPlus.dll
Represents a base abstraction for all WebSocket client implementations.
public interface IWebSocketClient
Properties
- DefaultHeaders
Gets the collection of default headers to send when connecting to the remote endpoint.
- IsConnected
Gets the current state of the WebSocket connection.
- Proxy
Gets the proxy settings for this client.
Methods
- AddDefaultHeader(string, string)
Adds a header to the default header collection.
- ConnectAsync(Uri)
Connects to a specified remote WebSocket endpoint.
- DisconnectAsync(int, string)
Disconnects the WebSocket connection.
- RemoveDefaultHeader(string)
Removes a header from the default header collection.
- SendMessageAsync(string)
Send a message to the WebSocket server.
Events
- Connected
Triggered when the client connects successfully.
- Disconnected
Triggered when the client is disconnected.
- ExceptionThrown
Triggered when an error occurs in the client.
- MessageReceived
Triggered when the client receives a message from the remote party.