Beast Logo

PrevUpHomeNext

http::async_read

Start an asynchronous operation to read an HTTP/1 message from a stream.

template<
    class AsyncReadStream,
    class DynamicBuffer,
    bool isRequest,
    bool isDirect,
    class Derived,
    class ReadHandler>
async_return_type< ReadHandler, void(error_code)>
async_read(
    AsyncReadStream& stream,
    DynamicBuffer& buffer,
    basic_parser< isRequest, isDirect, Derived >& parser,
    ReadHandler&& handler);

Read a HTTP/1 message asynchronously from a stream.

template<
    class AsyncReadStream,
    class DynamicBuffer,
    bool isRequest,
    class Body,
    class Fields,
    class ReadHandler>
async_return_type< ReadHandler, void(error_code)>
async_read(
    AsyncReadStream& stream,
    DynamicBuffer& buffer,
    message< isRequest, Body, Fields >& msg,
    ReadHandler&& handler);
Requirements

Header: beast/http/read.hpp

Convenience header: beast/http.hpp


PrevUpHomeNext