C# Class System.Net.WebSockets.WebSocket

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

Public Methods

Method Description
Abort ( ) : void
CloseAsync ( System closeStatus, string statusDescription, System cancellationToken ) : System.Threading.Tasks.Task
CloseOutputAsync ( System closeStatus, string statusDescription, System cancellationToken ) : System.Threading.Tasks.Task
CreateClientBuffer ( int receiveBufferSize, int sendBufferSize ) : System.ArraySegment
CreateServerBuffer ( int receiveBufferSize ) : System.ArraySegment
Dispose ( ) : void
ReceiveAsync ( System buffer, System cancellationToken ) : System.Threading.Tasks.Task
SendAsync ( System buffer, System messageType, bool endOfMessage, System cancellationToken ) : System.Threading.Tasks.Task

Protected Methods

Method Description
IsStateTerminal ( System state ) : bool
ThrowOnInvalidState ( System state ) : void
WebSocket ( )

Private Methods

Method Description
CreateClientWebSocket ( System innerStream, string subProtocol, int receiveBufferSize, int sendBufferSize, System keepAliveInterval, bool useZeroMaskingKey, System internalBuffer ) : System.Net.WebSockets.WebSocket
IsApplicationTargeting45 ( ) : bool
RegisterPrefixes ( ) : void

Method Details

Abort() public abstract method

public abstract Abort ( ) : void
return void

CloseAsync() public abstract method

public abstract CloseAsync ( System closeStatus, string statusDescription, System cancellationToken ) : System.Threading.Tasks.Task
closeStatus System
statusDescription string
cancellationToken System
return System.Threading.Tasks.Task

CloseOutputAsync() public abstract method

public abstract CloseOutputAsync ( System closeStatus, string statusDescription, System cancellationToken ) : System.Threading.Tasks.Task
closeStatus System
statusDescription string
cancellationToken System
return System.Threading.Tasks.Task

CreateClientBuffer() public static method

public static CreateClientBuffer ( int receiveBufferSize, int sendBufferSize ) : System.ArraySegment
receiveBufferSize int
sendBufferSize int
return System.ArraySegment

CreateServerBuffer() public static method

public static CreateServerBuffer ( int receiveBufferSize ) : System.ArraySegment
receiveBufferSize int
return System.ArraySegment

Dispose() public abstract method

public abstract Dispose ( ) : void
return void

IsStateTerminal() protected static method

protected static IsStateTerminal ( System state ) : bool
state System
return bool

ReceiveAsync() public abstract method

public abstract ReceiveAsync ( System buffer, System cancellationToken ) : System.Threading.Tasks.Task
buffer System
cancellationToken System
return System.Threading.Tasks.Task

SendAsync() public abstract method

public abstract SendAsync ( System buffer, System messageType, bool endOfMessage, System cancellationToken ) : System.Threading.Tasks.Task
buffer System
messageType System
endOfMessage bool
cancellationToken System
return System.Threading.Tasks.Task

ThrowOnInvalidState() protected static method

protected static ThrowOnInvalidState ( System state ) : void
state System
return void

WebSocket() protected method

protected WebSocket ( )