C# Class System.Net.WebSockets.WebSocketBase

Inheritance: WebSocket, IDisposable
显示文件 Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
CanHandleExceptionDuringClose bool
CleanUp void
CloseAsyncCore Task
CloseOutputAsyncCore Task
EnsureCloseOutputOperation void
EnsureKeepAliveOperation void
EnsureReceiveOperation void
EnsureSendOperation void
FinishOnCloseCompleted void
FinishOnCloseReceived void
GetBufferType WebSocketProtocolComponent.BufferType
GetMessageType WebSocketMessageType
OnBackgroundTaskException void
OnCloseOutputCompleted bool
OnKeepAlive void
ReceiveAsyncCore Task
ReleaseLock void
ReleaseLocks void
ResetFlagAndTakeLock void
ResetFlagsAndTakeLocks void
SendAsyncCore Task
SendFrameAsync Task
StartOnCloseCompleted Task
StartOnCloseReceived bool
TakeLocks void
ThrowIfAborted void
ThrowIfClosedOrAborted void
ThrowIfConvertibleException void
ThrowIfDisposed void
ThrowIfPendingException void
UpdateReceiveState void
ValidateNativeBuffers void

Public Methods

Method Description
Abort ( ) : void
CloseAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
CloseOutputAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
Dispose ( ) : void
ReceiveAsync ( ArraySegment buffer, CancellationToken cancellationToken ) : Task
SendAsync ( ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) : Task

Protected Methods

Method Description
StartKeepAliveTimer ( ) : void
WebSocketBase ( Stream innerStream, string subProtocol, TimeSpan keepAliveInterval, WebSocketBuffer internalBuffer ) : System.Collections.Generic

Private Methods

Method Description
CanHandleExceptionDuringClose ( Exception error ) : bool
CleanUp ( ) : void
CloseAsyncCore ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
CloseOutputAsyncCore ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
EnsureCloseOutputOperation ( ) : void
EnsureKeepAliveOperation ( ) : void
EnsureReceiveOperation ( ) : void
EnsureSendOperation ( ) : void
FinishOnCloseCompleted ( ) : void
FinishOnCloseReceived ( WebSocketCloseStatus closeStatus, string closeStatusDescription ) : void
GetBufferType ( WebSocketMessageType messageType, bool endOfMessage ) : WebSocketProtocolComponent.BufferType
GetMessageType ( WebSocketProtocolComponent bufferType ) : WebSocketMessageType
OnBackgroundTaskException ( Exception exception ) : void
OnCloseOutputCompleted ( ) : bool
OnKeepAlive ( object sender ) : void
ReceiveAsyncCore ( ArraySegment buffer, CancellationToken cancellationToken ) : Task
ReleaseLock ( object lockObject, bool &lockTaken ) : void
ReleaseLocks ( bool &thisLockTaken, bool &sessionHandleLockTaken ) : void
ResetFlagAndTakeLock ( object lockObject, bool &thisLockTaken ) : void
ResetFlagsAndTakeLocks ( bool &thisLockTaken, bool &sessionHandleLockTaken ) : void
SendAsyncCore ( ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) : Task
SendFrameAsync ( IList sendBuffers, CancellationToken cancellationToken ) : Task
StartOnCloseCompleted ( bool thisLockTakenSnapshot, bool sessionHandleLockTakenSnapshot, CancellationToken cancellationToken ) : Task
StartOnCloseReceived ( bool &thisLockTaken ) : bool
TakeLocks ( bool &thisLockTaken, bool &sessionHandleLockTaken ) : void
ThrowIfAborted ( bool aborted, Exception innerException ) : void
ThrowIfClosedOrAborted ( ) : void
ThrowIfConvertibleException ( string methodName, Exception exception, CancellationToken cancellationToken, bool aborted ) : void
ThrowIfDisposed ( ) : void
ThrowIfPendingException ( ) : void
UpdateReceiveState ( int newReceiveState, int expectedReceiveState ) : void
ValidateNativeBuffers ( WebSocketProtocolComponent action, WebSocketProtocolComponent bufferType, Interop dataBuffers, uint dataBufferCount ) : 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

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

StartKeepAliveTimer() protected method

protected StartKeepAliveTimer ( ) : void
return void

WebSocketBase() protected method

protected WebSocketBase ( Stream innerStream, string subProtocol, TimeSpan keepAliveInterval, WebSocketBuffer internalBuffer ) : System.Collections.Generic
innerStream System.IO.Stream
subProtocol string
keepAliveInterval TimeSpan
internalBuffer WebSocketBuffer
return System.Collections.Generic