Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit d7c8a7cf0d.
PrevUpHomeNext
http::write (2 of 6 overloads)

Write a complete message to a stream using a serializer.

Synopsis

Defined in header <boost/beast/http/write.hpp>

template<
    class SyncWriteStream,
    bool isRequest,
    class Body,
    class Fields>
std::size_t
write(
    SyncWriteStream& stream,
    serializer< isRequest, Body, Fields >& sr,
    error_code& ec);
Description

This function is used to write a complete message to a stream using a caller-provided HTTP/1 serializer. The call will block until one of the following conditions is true:

This operation is implemented in terms of one or more calls to the stream's write_some function.

Parameters

Name

Description

stream

The stream to which the data is to be written. The type must support the SyncWriteStream concept.

sr

The serializer to use.

ec

Set to the error, if any occurred.

Return Value

The number of bytes written to the stream.

See Also

serializer


PrevUpHomeNext