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 an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
websocket::stream::write_some (2 of 2 overloads)

Write partial message data on the stream.

Synopsis
template<
    class ConstBufferSequence>
std::size_t
write_some(
    bool fin,
    ConstBufferSequence const& buffers,
    error_code& ec);
Description

This function is used to write some or all of a message's payload to the stream. 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.

If this is the beginning of a new message, the message opcode will be set to text or binary as per the current setting of the websocket::stream::binary option. The actual payload sent may be transformed as per the WebSocket protocol settings.

Parameters

Name

Description

fin

true if this is the last part of the message.

buffers

The input buffer sequence holding the data to write.

ec

Set to indicate what error occurred, if any.

Return Value

The number of bytes written from the buffers. If an error occurred, this will be less than the sum of the buffer sizes.

The number of bytes consumed in the input buffers.


PrevUpHomeNext