C# Класс Microsoft.AspNetCore.WebSockets.Protocol.CommonWebSocket

Наследование: System.Net.WebSockets.WebSocket
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Abort ( ) : void
CloseAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
CloseOutputAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
ConnectAsync ( Uri uri, CancellationToken cancellationToken ) : Task
CreateClientWebSocket ( string subProtocol, System.TimeSpan keepAliveInterval, int receiveBufferSize, bool useZeroMask ) : CommonWebSocket
Dispose ( ) : void
ReceiveAsync ( ArraySegment buffer, CancellationToken cancellationToken ) : Task
SendAsync ( ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) : Task

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

Метод Описание
CommonWebSocket ( string subProtocol, System.TimeSpan keepAliveInterval, int receiveBufferSize, bool maskOutput, bool useZeroMask, bool unmaskInput ) : System

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

Метод Описание
EnsureDataAvailableOrReadAsync ( int bytesNeeded, CancellationToken cancellationToken ) : Task
GetNextMask ( ) : int
ProcessCloseFrameAsync ( CancellationToken cancellationToken ) : Task
ReadNextFrameAsync ( CancellationToken cancellationToken ) : Task
SendErrorAbortAndThrow ( WebSocketCloseStatus error, string message, CancellationToken cancellationToken ) : Task
SendKeepAlive ( object state ) : void
SendKeepAliveAsync ( ) : void
SendPongReplyAsync ( CancellationToken cancellationToken ) : Task
ThrowIfDisposed ( ) : void
ThrowIfInputClosed ( ) : void
ThrowIfOutputClosed ( ) : void
ValidateCloseStatus ( WebSocketCloseStatus closeStatus ) : bool
ValidateOpCode ( int opCode ) : bool
ValidateSegment ( ArraySegment buffer ) : void

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

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

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

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

public CloseAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
closeStatus WebSocketCloseStatus
statusDescription string
cancellationToken System.Threading.CancellationToken
Результат Task

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

public CloseOutputAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
closeStatus WebSocketCloseStatus
statusDescription string
cancellationToken System.Threading.CancellationToken
Результат Task

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

protected CommonWebSocket ( string subProtocol, System.TimeSpan keepAliveInterval, int receiveBufferSize, bool maskOutput, bool useZeroMask, bool unmaskInput ) : System
subProtocol string
keepAliveInterval System.TimeSpan
receiveBufferSize int
maskOutput bool
useZeroMask bool
unmaskInput bool
Результат System

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

public ConnectAsync ( Uri uri, CancellationToken cancellationToken ) : Task
uri System.Uri
cancellationToken System.Threading.CancellationToken
Результат Task

CreateClientWebSocket() публичный статический Метод

public static CreateClientWebSocket ( string subProtocol, System.TimeSpan keepAliveInterval, int receiveBufferSize, bool useZeroMask ) : CommonWebSocket
subProtocol string
keepAliveInterval System.TimeSpan
receiveBufferSize int
useZeroMask bool
Результат CommonWebSocket

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

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

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

public ReceiveAsync ( ArraySegment buffer, CancellationToken cancellationToken ) : Task
buffer ArraySegment
cancellationToken System.Threading.CancellationToken
Результат Task

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

public SendAsync ( ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) : Task
buffer ArraySegment
messageType WebSocketMessageType
endOfMessage bool
cancellationToken System.Threading.CancellationToken
Результат Task