Preliminary. ThinkMeta ConcurrentTasks and this documentation are preliminary; everything is subject to change.

API reference / Async I/O

AsyncSocketRecvIoRequest class

A request for receive operations that also captures the result flags.

On this page
Use
import ThinkMeta.ConcurrentTasks.AsyncIo.AsyncSocketIoRequest;
Namespace
ThinkMeta::ConcurrentTasks::AsyncIo
Inherits
AsyncSocketIoRequest
Platforms
Windows

Syntax

Remarks

The flags (MSG_PARTIAL, MSG_TRUNC, ...) are available once the operation has completed (GetFlags). Not usable on its own: use WaitableAsyncSocketRecvIoRequest(_s), or an own request type built on it.

See also

WaitableAsyncSocketRecvIoRequest_s

Constructors

AsyncSocketRecvIoRequestprotected

Creates an idle request.

Syntax

explicit AsyncSocketRecvIoRequest(SOCKET socket) noexcept;

Parameters

socketSOCKET
The socket the operation runs on; used to query the result flags.

Methods

GetFlags

The result flags of the completed receive.

Syntax

DWORD GetFlags() const noexcept;

Return value

Type: DWORD

The MSG_* result flags (e.g. MSG_PARTIAL); 0 if none were reported.

Remarks

Valid after completion only.

RequestCompleted

Records the result and, on success, fetches the result flags.

Syntax

void RequestCompleted(
    CompletionError error,
    ByteCount bytesTransferred
) noexcept override;

Parameters

errorCompletionError
The operation's own Win32/WSA error code; ERROR_SUCCESS (0) on success.
bytesTransferredByteCount
Bytes the operation transferred.

Remarks

The flags are read with WSAGetOverlappedResult.

Reset

Re-arms the request for another receive.

Syntax

void Reset() noexcept override;

Remarks

Only after the previous operation has completed; clears the result flags too.

Generated from ThinkMeta.ConcurrentTasks.API @ c7663c4 (2026-11-19).