|
C++ Actor Framework 0.19
|
Implements the client part for the WebSocket Protocol as defined in RFC. More...
#include <client.hpp>
Public Types | |
| using | handshake_ptr = std::unique_ptr< handshake > |
| using | upper_layer_ptr = std::unique_ptr< web_socket::upper_layer > |
Public Member Functions | |
| client (handshake_ptr hs, upper_layer_ptr up) | |
| error | start (octet_stream::lower_layer *down) override |
| Initializes the upper layer. | |
| void | abort (const error &reason) override |
| Called by the lower layer for cleaning up any state in case of an error or when disposed. | |
| ptrdiff_t | consume (byte_span buffer, byte_span delta) override |
| Consumes bytes from the lower layer. | |
| void | prepare_send () override |
| Gives the upper layer an opportunity to add additional data to the output buffer. | |
| bool | done_sending () override |
| Queries whether all pending data has been sent. | |
| virtual error | start (lower_layer *down)=0 |
| Initializes the upper layer. | |
| virtual ptrdiff_t | consume (byte_span buffer, byte_span delta)=0 |
| Consumes bytes from the lower layer. | |
| virtual void | prepare_send ()=0 |
| Gives the upper layer an opportunity to add additional data to the output buffer. | |
| virtual bool | done_sending ()=0 |
| Queries whether all pending data has been sent. | |
| virtual void | abort (const error &reason)=0 |
| Called by the lower layer for cleaning up any state in case of an error or when disposed. | |
Static Public Member Functions | |
| static std::unique_ptr< client > | make (handshake_ptr hs, upper_layer_ptr up) |
| static std::unique_ptr< client > | make (handshake &&hs, upper_layer_ptr up) |
Implements the client part for the WebSocket Protocol as defined in RFC.
UpperLayer.
|
overridevirtual |
Called by the lower layer for cleaning up any state in case of an error or when disposed.
Implements caf::net::generic_upper_layer.
|
overridevirtual |
Consumes bytes from the lower layer.
| buffer | Available bytes to read. |
| delta | Bytes that arrived since last calling this function. |
Implements caf::net::octet_stream::upper_layer.
|
overridevirtual |
Queries whether all pending data has been sent.
The lower calls this function to decide whether it has to wait for write events on the socket.
Implements caf::net::generic_upper_layer.
|
overridevirtual |
Gives the upper layer an opportunity to add additional data to the output buffer.
Implements caf::net::generic_upper_layer.
|
overridevirtual |
Initializes the upper layer.
| down | A pointer to the lower layer that remains valid for the lifetime of the upper layer. |
Implements caf::net::octet_stream::upper_layer.