Table of Contents

Interface IWebSocketClient

Namespace
DisCatSharp.Net.WebSocket
Assembly
DisCatSharp.dll

Represents a base abstraction for all WebSocket client implementations.

public interface IWebSocketClient : IDisposable
Inherited Members

Properties

DefaultHeaders

Gets the collection of default headers to send when connecting to the remote endpoint.

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.