C# Class System.Net.WebSockets.ClientWebSocket

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

Public Methods

Method Description
Abort ( ) : void
ClientWebSocket ( )
ClientWebSocket ( ) : System.Diagnostics
CloseAsync ( System closeStatus, string statusDescription, System cancellationToken ) : System.Threading.Tasks.Task
CloseAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
CloseOutputAsync ( System closeStatus, string statusDescription, System cancellationToken ) : System.Threading.Tasks.Task
CloseOutputAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
ConnectAsync ( System uri, System cancellationToken ) : System.Threading.Tasks.Task
ConnectAsync ( Uri uri, CancellationToken cancellationToken ) : Task
Dispose ( ) : void
ReceiveAsync ( System buffer, System cancellationToken ) : System.Threading.Tasks.Task
ReceiveAsync ( ArraySegment buffer, CancellationToken cancellationToken ) : Task
SendAsync ( System buffer, System messageType, bool endOfMessage, System cancellationToken ) : System.Threading.Tasks.Task
SendAsync ( ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) : Task

Private Methods

Method Description
ConnectAsyncCore ( Uri uri, CancellationToken cancellationToken ) : Task
ThrowIfInvalidState ( WebSocketState currentState, bool isDisposed, WebSocketState validStates ) : void
ThrowIfNotConnected ( ) : void

Method Details

Abort() public method

public Abort ( ) : void
return void

ClientWebSocket() public method

public ClientWebSocket ( )

ClientWebSocket() public method

public ClientWebSocket ( ) : System.Diagnostics
return System.Diagnostics

CloseAsync() public method

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

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 ( System closeStatus, string statusDescription, System cancellationToken ) : System.Threading.Tasks.Task
closeStatus System
statusDescription string
cancellationToken System
return System.Threading.Tasks.Task

CloseOutputAsync() public method

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

ConnectAsync() public method

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

ConnectAsync() public method

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

Dispose() public method

public Dispose ( ) : void
return void

ReceiveAsync() public method

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

ReceiveAsync() public method

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

SendAsync() public method

public 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

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