C# 클래스 System.Net.WebSockets.WebSocketHandle

파일 보기 프로젝트 열기: dotnet/corefx 1 사용 예제들

공개 메소드들

메소드 설명
Abort ( ) : void
CheckPlatformSupport ( ) : void
CloseAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
CloseOutputAsync ( WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken ) : Task
ConnectAsyncCore ( Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options ) : Task
Create ( ) : WebSocketHandle
Dispose ( ) : void
IsValid ( WebSocketHandle handle ) : bool
ReceiveAsync ( ArraySegment buffer, CancellationToken cancellationToken ) : Task
SendAsync ( ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) : Task

비공개 메소드들

메소드 설명
BuildRequestHeader ( Uri uri, ClientWebSocketOptions options, string secKey ) : byte[]

Creates a byte[] containing the headers to send to the server.

ConnectSocketAsync ( string host, int port, CancellationToken cancellationToken ) : Task

Connects a socket to the specified host and port, subject to cancellation and aborting.

CreateSecKeyAndSecWebSocketAccept ( ) : string>.KeyValuePair
ParseAndValidateConnectResponseAsync ( System.Stream stream, ClientWebSocketOptions options, string expectedSecWebSocketAccept, CancellationToken cancellationToken ) : Task

Read and validate the connect response headers from the server.

ReadResponseHeaderLineAsync ( System.Stream stream, CancellationToken cancellationToken ) : Task

Reads a line from the stream.

ValidateAndTrackHeader ( string targetHeaderName, string targetHeaderValue, string foundHeaderName, string foundHeaderValue, bool &foundHeader ) : void

Validates a received header against expected values and tracks that we've received it.

WebSocketHandle ( System.Net.WebSockets.WinHttpWebSocket webSocket ) : System
WebSocketHandle ( System.Net.WebSockets.WinRTWebSocket webSocket ) : System

메소드 상세

Abort() 공개 메소드

public Abort ( ) : void
리턴 void

CheckPlatformSupport() 공개 정적인 메소드

public static CheckPlatformSupport ( ) : void
리턴 void

CloseAsync() 공개 메소드

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

CloseOutputAsync() 공개 메소드

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

ConnectAsyncCore() 공개 메소드

public ConnectAsyncCore ( Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options ) : Task
uri System.Uri
cancellationToken System.Threading.CancellationToken
options ClientWebSocketOptions
리턴 Task

Create() 공개 정적인 메소드

public static Create ( ) : WebSocketHandle
리턴 WebSocketHandle

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

IsValid() 공개 정적인 메소드

public static IsValid ( WebSocketHandle handle ) : bool
handle WebSocketHandle
리턴 bool

ReceiveAsync() 공개 메소드

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

SendAsync() 공개 메소드

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