AsyncSocketIoRequest class
The state of one overlapped socket operation.
- Use
import ThinkMeta.ConcurrentTasks.AsyncIo.AsyncSocketIoRequest;- Namespace
ThinkMeta::ConcurrentTasks::AsyncIo- Inherits
AsyncIoRequest
Syntax
class AsyncSocketIoRequest : public AsyncIoRequest<Windows::WinsockErrorCode>Remarks
Holds its OVERLAPPED, the bytes transferred and the Windows::WinsockErrorCode it completed with. Not usable on its own: use a Waitable variant below (WaitableAsyncSocketIoRequest, WaitableAsyncSocketIoRequest_s), or an own request type that reacts to the completion in RequestCompleted. The owner keeps the request alive and in place from the start of the operation until RequestCompleted has run; it can be reused for another operation after AsyncIoRequest::Reset.
See also
Constructors
AsyncSocketIoRequestprotected
Creates an idle request.
Syntax
AsyncSocketIoRequest() noexcept = default;Remarks
Zeroed OVERLAPPED, no error, 0 bytes.
Methods
RequestCompleted
Records the operation's result.
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
Called exactly once per operation: on the starting thread when the operation completed synchronously, otherwise on the core's I/O thread. Completion handling in an own request type must be short and must not block or suspend.
Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).