folly::coro::Transport::read

read overloads

Synopses

Declared in <folly/io/coro/Transport.h>

Reads up to buf.size() bytes into buf, waiting at most timeout.

virtual
Task<size_t>
read(
    MutableByteRange buf,
    std::chrono::milliseconds timeout) override;
» more...

Reads up to buflen bytes into buf, waiting at most timeout.

Task<size_t>
read(
    void* buf,
    size_t buflen,
    std::chrono::milliseconds timeout);
» more...

Reads data into an IOBufQueue, waiting at most timeout.

virtual
Task<size_t>
read(
    IOBufQueue& buf,
    size_t minReadSize,
    size_t newAllocationSize,
    std::chrono::milliseconds timeout) override;
» more...

Return Value

The number of bytes read.

Parameters

NameDescription
bufDestination buffer for the read bytes.
timeoutMaximum time to wait for data.
buflenSize of the destination buffer.
minReadSizeMinimum number of bytes to allocate for the read.
newAllocationSizeSize of newly allocated buffers.