C# 클래스 System.Net.Sockets.NetworkStream.AwaitableSocketAsyncEventArgs

A SocketAsyncEventArgs that can be awaited to get the result of an operation.
상속: SocketAsyncEventArgs, ICriticalNotifyCompletion
파일 보기 프로젝트 열기: dotnet/corefx

Private Properties

프로퍼티 타입 설명
ThrowIOSocketException void

공개 메소드들

메소드 설명
AwaitableSocketAsyncEventArgs ( Socket socket, byte buffer ) : System.Buffers

Initializes the event args.

GetAwaiter ( ) : AwaitableSocketAsyncEventArgs

Gets this instance.

GetResult ( ) : int

Gets the result of the completion operation.

Unlike Task's awaiter's GetResult, this does not block until the operation completes: it must only be used once the operation has completed. This is handled implicitly by await.

OnCompleted ( Action continuation ) : void

Queues the provided continuation to be executed once the operation has completed.

ReceiveAsync ( ) : AwaitableSocketAsyncEventArgs

Initiates a receive operation on the associated socket.

UnsafeOnCompleted ( Action continuation ) : void

Same as OnCompleted(Action)

비공개 메소드들

메소드 설명
ThrowIOSocketException ( ) : void

메소드 상세

AwaitableSocketAsyncEventArgs() 공개 메소드

Initializes the event args.
public AwaitableSocketAsyncEventArgs ( Socket socket, byte buffer ) : System.Buffers
socket Socket The associated socket.
buffer byte The buffer to use for all operations.
리턴 System.Buffers

GetAwaiter() 공개 메소드

Gets this instance.
public GetAwaiter ( ) : AwaitableSocketAsyncEventArgs
리턴 AwaitableSocketAsyncEventArgs

GetResult() 공개 메소드

Gets the result of the completion operation.
Unlike Task's awaiter's GetResult, this does not block until the operation completes: it must only be used once the operation has completed. This is handled implicitly by await.
public GetResult ( ) : int
리턴 int

OnCompleted() 공개 메소드

Queues the provided continuation to be executed once the operation has completed.
public OnCompleted ( Action continuation ) : void
continuation Action
리턴 void

ReceiveAsync() 공개 메소드

Initiates a receive operation on the associated socket.
public ReceiveAsync ( ) : AwaitableSocketAsyncEventArgs
리턴 AwaitableSocketAsyncEventArgs

UnsafeOnCompleted() 공개 메소드

Same as OnCompleted(Action)
public UnsafeOnCompleted ( Action continuation ) : void
continuation Action
리턴 void