...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Write some message data.
template< class ConstBufferSequence> std::size_t write_some( bool fin, ConstBufferSequence const& buffers, error_code& ec);
This function is used to send part of a message.
The call blocks until one of the following is true:
The algorithm, known as a composed operation, is
implemented in terms of calls to the next layer's write_some
function.
If this is the beginning of a new message, the message opcode will be
set to text or binary based on the current setting of the binary
(or text
) option. The actual payload
sent may be transformed as per the WebSocket protocol settings.
This function always writes a complete WebSocket frame (not WebSocket message) upon successful completion, so it is well defined to perform ping, pong, and close operations after this operation completes.
Name |
Description |
---|---|
|
|
|
The buffers containing the message part to send. |
|
Set to indicate what error occurred, if any. |
The number of bytes sent from the buffers.
The number of bytes consumed in the input buffers.