C# Класс WebSocket.Portable.WebSocketBase

Наследование: ICanLog, IWebSocket
Показать файл Открыть проект

Открытые методы

Метод Описание
CloseAsync ( WebSocketErrorCode errorCode ) : Task
ConnectAsync ( string uri, int port, bool useSSL ) : Task

Connects asynchronous.

ConnectAsync ( string uri, int port, bool useSSL, CancellationToken cancellationToken ) : Task

Connects asynchronous.

Dispose ( ) : void
ReceiveFrameAsync ( ) : Task
ReceiveFrameAsync ( CancellationToken cancellationToken ) : Task
RegisterExtension ( IWebSocketExtension extension ) : void
SendFrameAsync ( IWebSocketFrame frame ) : Task
SendFrameAsync ( IWebSocketFrame frame, CancellationToken cancellationToken ) : Task
SendHandshakeAsync ( ) : Task

Sends the default handshake asynchronous.

SendHandshakeAsync ( CancellationToken cancellationToken ) : Task

Sends the default handshake asynchronous.

SendHandshakeAsync ( WebSocket.Portable.WebSocketRequestHandshake handshake ) : Task

Sends the handshake asynchronous.

SendHandshakeAsync ( WebSocket.Portable.WebSocketRequestHandshake handshake, CancellationToken cancellationToken ) : Task

Sends the handshake asynchronous.

SetSubProtocol ( string subProtocol ) : void

Защищенные методы

Метод Описание
ConnectAsyncInternal ( string host, int port, bool useSsl, CancellationToken cancellationToken ) : Task

Connects asynchronous.

WebSocketBase ( ) : System

Prevents a default instance of the WebSocketBase class from being created.

Приватные методы

Метод Описание
SendAsync ( byte buffer, int offset, int length, CancellationToken cancellationToken ) : Task

Sends data asynchronous.

SendAsync ( string data, Encoding encoding, CancellationToken cancellationToken ) : Task

Sends data asynchronous.

Описание методов

CloseAsync() публичный Метод

public CloseAsync ( WebSocketErrorCode errorCode ) : Task
errorCode WebSocketErrorCode
Результат Task

ConnectAsync() публичный Метод

Connects asynchronous.
public ConnectAsync ( string uri, int port, bool useSSL ) : Task
uri string The URI.
port int
useSSL bool
Результат Task

ConnectAsync() публичный Метод

Connects asynchronous.
Cannot connect because current state is + _state
public ConnectAsync ( string uri, int port, bool useSSL, CancellationToken cancellationToken ) : Task
uri string The URI.
port int
useSSL bool
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

ConnectAsyncInternal() защищенный абстрактный Метод

Connects asynchronous.
protected abstract ConnectAsyncInternal ( string host, int port, bool useSsl, CancellationToken cancellationToken ) : Task
host string The host.
port int The port.
useSsl bool if set to true [use SSL].
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

ReceiveFrameAsync() публичный Метод

public ReceiveFrameAsync ( ) : Task
Результат Task

ReceiveFrameAsync() публичный Метод

public ReceiveFrameAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Результат Task

RegisterExtension() публичный Метод

public RegisterExtension ( IWebSocketExtension extension ) : void
extension IWebSocketExtension
Результат void

SendFrameAsync() публичный Метод

public SendFrameAsync ( IWebSocketFrame frame ) : Task
frame IWebSocketFrame
Результат Task

SendFrameAsync() публичный Метод

public SendFrameAsync ( IWebSocketFrame frame, CancellationToken cancellationToken ) : Task
frame IWebSocketFrame
cancellationToken System.Threading.CancellationToken
Результат Task

SendHandshakeAsync() публичный Метод

Sends the default handshake asynchronous.
public SendHandshakeAsync ( ) : Task
Результат Task

SendHandshakeAsync() публичный Метод

Sends the default handshake asynchronous.
public SendHandshakeAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

SendHandshakeAsync() публичный Метод

Sends the handshake asynchronous.
public SendHandshakeAsync ( WebSocket.Portable.WebSocketRequestHandshake handshake ) : Task
handshake WebSocket.Portable.WebSocketRequestHandshake The handshake.
Результат Task

SendHandshakeAsync() публичный Метод

Sends the handshake asynchronous.
public SendHandshakeAsync ( WebSocket.Portable.WebSocketRequestHandshake handshake, CancellationToken cancellationToken ) : Task
handshake WebSocket.Portable.WebSocketRequestHandshake The handshake.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

SetSubProtocol() публичный Метод

public SetSubProtocol ( string subProtocol ) : void
subProtocol string
Результат void

WebSocketBase() защищенный Метод

Prevents a default instance of the WebSocketBase class from being created.
protected WebSocketBase ( ) : System
Результат System