adapnex::core::TCPConnection::Read

Read from the connection.

Synopsis

Declared in <adapnex/core/network.h>

virtual
ssize_t
Read(
    std::span<uint8_t> data,
    Duration total_timeout) = 0;

Description

With zero timeout, the read operation will return immediately (non‐blocking) with the data available.

Return Value

Returns the number of bytes read, or ‐1 on error.

Parameters

Name Description

data

The buffer to read data into.

total_timeout

The maximum duration to wait for the entire read operation to complete.

Created with MrDocs