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

Inheritance: System.Net.WebSockets.WebSocket
Mostrar archivo Open project: AdaptiveConsulting/ReactiveTraderCloud Class Usage Examples

Public Methods

Method 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

Protected Methods

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

Private Methods

Method 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 method

public Abort ( ) : void
return void

CloseAsync() public method

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

CloseOutputAsync() public method

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

CommonWebSocket() protected method

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
return System

ConnectAsync() public method

public ConnectAsync ( Uri uri, CancellationToken cancellationToken ) : Task
uri System.Uri
cancellationToken System.Threading.CancellationToken
return Task

CreateClientWebSocket() public static method

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

Dispose() public method

public Dispose ( ) : void
return void

ReceiveAsync() public method

public ReceiveAsync ( ArraySegment buffer, CancellationToken cancellationToken ) : Task
buffer ArraySegment
cancellationToken System.Threading.CancellationToken
return Task

SendAsync() public method

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