C# Class Microsoft.AspNetCore.WebSockets.Protocol.CommonWebSocket

Inheritance: System.Net.WebSockets.WebSocket
Afficher le fichier Open project: AdaptiveConsulting/ReactiveTraderCloud Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
CommonWebSocket ( string subProtocol, System.TimeSpan keepAliveInterval, int receiveBufferSize, bool maskOutput, bool useZeroMask, bool unmaskInput ) : System

Private Methods

Méthode Description
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

Method Details

Abort() public méthode

public Abort ( ) : void
Résultat void

CloseAsync() public méthode

public CloseAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
closeStatus WebSocketCloseStatus
statusDescription string
cancellationToken System.Threading.CancellationToken
Résultat Task

CloseOutputAsync() public méthode

public CloseOutputAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
closeStatus WebSocketCloseStatus
statusDescription string
cancellationToken System.Threading.CancellationToken
Résultat Task

CommonWebSocket() protected méthode

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
Résultat System

ConnectAsync() public méthode

public ConnectAsync ( Uri uri, CancellationToken cancellationToken ) : Task
uri System.Uri
cancellationToken System.Threading.CancellationToken
Résultat Task

CreateClientWebSocket() public static méthode

public static CreateClientWebSocket ( string subProtocol, System.TimeSpan keepAliveInterval, int receiveBufferSize, bool useZeroMask ) : CommonWebSocket
subProtocol string
keepAliveInterval System.TimeSpan
receiveBufferSize int
useZeroMask bool
Résultat CommonWebSocket

Dispose() public méthode

public Dispose ( ) : void
Résultat void

ReceiveAsync() public méthode

public ReceiveAsync ( ArraySegment buffer, CancellationToken cancellationToken ) : Task
buffer ArraySegment
cancellationToken System.Threading.CancellationToken
Résultat Task

SendAsync() public méthode

public SendAsync ( ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) : Task
buffer ArraySegment
messageType WebSocketMessageType
endOfMessage bool
cancellationToken System.Threading.CancellationToken
Résultat Task