EHS Embedded HTTP Server
1.5.1.0
|
The main parser/codec for our WebSockets implementation. More...
#include <wsframe.h>
Public Member Functions | |
parser (rng_policy &rng) | |
Constructor. More... | |
bool | ready () const |
Retrieves the state of this instance. More... | |
void | reset () |
Resets this endpoint to its initial state. | |
void | consume (std::istream &s) |
Reads incoming data and decodes it. More... | |
std::string | get_header_str () |
Retrieves header. More... | |
std::string | get_payload_str () const |
Retrieves payload. More... | |
std::vector< unsigned char > & | get_payload () |
Retrieves payload. More... | |
bool | is_control () const |
Check for control message. More... | |
void | set_fin (bool fin) |
Set the FIN bit of the current message. More... | |
opcode::value | get_opcode () const |
Retrieve message opcode. More... | |
void | set_opcode (opcode::value op) |
Set the opcode of the current message. More... | |
void | set_masked (bool masked) |
Set the MASKED bit of the current message. More... | |
void | set_payload (const std::string &source) |
Set the payload of the current message. More... | |
void | set_payload (const std::vector< unsigned char > &source) |
Set the payload of the current message. More... | |
close::status::value | get_close_code () const |
Retrieve the close code (reason) of a CLOSE message. More... | |
std::string | get_close_reason () const |
Retrieve the textual reason of a CLOSE message. More... | |
The main parser/codec for our WebSockets implementation.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Retrieves header.
Definition at line 313 of file wsframe.h.
Referenced by wsendpoint::send().
|
inline |
Retrieve message opcode.
Definition at line 357 of file wsframe.h.
Referenced by parser< wspp::simple_rng >::is_control().
|
inline |
|
inline |
Retrieves payload.
Definition at line 321 of file wsframe.h.
Referenced by parser< wspp::simple_rng >::get_close_reason(), and wsendpoint::send().
|
inline |
Check for control message.
Definition at line 337 of file wsframe.h.
Referenced by parser< wspp::simple_rng >::set_opcode().
|
inline |
|
inline |
Set the FIN bit of the current message.
fin | The value of the FIN bit. |
Definition at line 345 of file wsframe.h.
Referenced by wsendpoint::send().
|
inline |
Set the MASKED bit of the current message.
masked | The value of the MASKED bit. If true, generate a masking key. |
Definition at line 386 of file wsframe.h.
Referenced by wsendpoint::send().
|
inline |
Set the opcode of the current message.
op | The value of the opcode according to RFC6455. |
Definition at line 365 of file wsframe.h.
Referenced by wsendpoint::send().
|
inline |
Set the payload of the current message.
source | The payload for the current message. |
Definition at line 400 of file wsframe.h.
Referenced by wsendpoint::send().
|
inline |