C# Класс System.Net.Sockets.NetworkStream.AwaitableSocketAsyncEventArgs

A SocketAsyncEventArgs that can be awaited to get the result of an operation.
Наследование: SocketAsyncEventArgs, ICriticalNotifyCompletion
Показать файл Открыть проект

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