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.

Use
import ThinkMeta.ConcurrentTasks.AsyncIo.AsyncSocketIoRequest;
Namespace
ThinkMeta::ConcurrentTasks::AsyncIo
Inherits
AsyncSocketIoRequest

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.

See also

SetFlags

SetFlags

Stores the result flags.

Syntax

void SetFlags(DWORD flags) noexcept;

Parameters

flagsDWORD
The MSG_* result flags of the receive.

Remarks

AsyncSocket sets them when a receive completes synchronously.

See also

GetFlags

RequestCompleted

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

Syntax

void RequestCompleted(DWORD error, DWORD bytesTransferred) noexcept override;

Parameters

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

Remarks

The flags are read with WSAGetOverlappedResult.

Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).