![]() |
Home | Libraries | People | FAQ | More |
Read some message data.
template< class MutableBufferSequence> std::size_t read_some( MutableBufferSequence const& buffers);
This function is used to read some message data. The call blocks until one of the following is true:
websocket::closed.
The algorithm, known as a composed operation, is
implemented in terms of calls to the next layer's read_some
and write_some functions.
The functions websocket::stream::got_binary and websocket::stream::got_text may be used to query
the stream and determine the type of the last received message. The function
websocket::stream::is_message_done may be called
to determine if the message received by the last read operation is complete.
Until the call returns, the implementation will read incoming control
frames and handle them automatically as follows:
websocket::stream::control_callback will be
invoked for each control frame.
websocket::closed will be indicated.
The number of message payload bytes appended to the buffer.
|
Name |
Description |
|---|---|
|
|
A buffer sequence to write message data into. The previous contents of the buffers will be overwritten, starting from the beginning. |
|
Type |
Thrown On |
|---|---|
|
|
Thrown on failure. |