|
EHS Embedded HTTP Server
1.5.0.132
|
The main parser/codec for our WebSockets implementation. More...
#include <wsframe.h>
Public Member Functions | |
| parser (rng_policy &rng) | |
| Constructor. | |
| bool | ready () const |
| Retrieves the state of this instance. | |
| void | reset () |
| Resets this endpoint to its initial state. | |
| void | consume (std::istream &s) |
| Reads incoming data and decodes it. | |
| std::string | get_header_str () |
| Retrieves header. | |
| std::string | get_payload_str () const |
| Retrieves payload. | |
| std::vector< unsigned char > & | get_payload () |
| Retrieves payload. | |
| bool | is_control () const |
| Check for control message. | |
| void | set_fin (bool fin) |
| Set the FIN bit of the current message. | |
| opcode::value | get_opcode () const |
| Retrieve message opcode. | |
| void | set_opcode (opcode::value op) |
| Set the opcode of the current message. | |
| void | set_masked (bool masked) |
| Set the MASKED bit of the current message. | |
| void | set_payload (const std::string &source) |
| Set the payload of the current message. | |
| void | set_payload (const std::vector< unsigned char > &source) |
| Set the payload of the current message. | |
| close::status::value | get_close_code () const |
| Retrieve the close code (reason) of a CLOSE message. | |
| std::string | get_close_reason () const |
| Retrieve the textual reason of a CLOSE message. | |
The main parser/codec for our WebSockets implementation.
| parser | ( | rng_policy & | rng | ) | [inline] |
| void consume | ( | std::istream & | s | ) | [inline] |
Reads incoming data and decodes it.
Method invariant: One of the following must always be true even in the case of exceptions.
| s | The stream of incoming data. |
Definition at line 222 of file wsframe.h.
Referenced by wsendpoint::AddRxData().
Here is the caller graph for this function:| close::status::value get_close_code | ( | ) | const [inline] |
| std::string get_close_reason | ( | ) | const [inline] |
| std::string get_header_str | ( | ) | [inline] |
Retrieves header.
Definition at line 313 of file wsframe.h.
Referenced by wsendpoint::send().
Here is the caller graph for this function:| opcode::value get_opcode | ( | ) | const [inline] |
Retrieve message opcode.
Definition at line 357 of file wsframe.h.
Referenced by parser< simple_rng >::is_control().
Here is the caller graph for this function:| std::vector<unsigned char>& get_payload | ( | ) | [inline] |
| std::string get_payload_str | ( | ) | const [inline] |
Retrieves payload.
Definition at line 321 of file wsframe.h.
Referenced by wsendpoint::send(), and parser< simple_rng >::get_close_reason().
Here is the caller graph for this function:| bool is_control | ( | ) | const [inline] |
Check for control message.
Definition at line 337 of file wsframe.h.
Referenced by wsendpoint::AddRxData(), and parser< simple_rng >::set_opcode().
Here is the caller graph for this function:| bool ready | ( | ) | const [inline] |
Retrieves the state of this instance.
Definition at line 198 of file wsframe.h.
Referenced by wsendpoint::AddRxData().
Here is the caller graph for this function:| void set_fin | ( | bool | fin | ) | [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().
Here is the caller graph for this function:| void set_masked | ( | bool | masked | ) | [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().
Here is the caller graph for this function:| void set_opcode | ( | opcode::value | op | ) | [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().
Here is the caller graph for this function:| void set_payload | ( | const std::string & | source | ) | [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().
Here is the caller graph for this function:| void set_payload | ( | const std::vector< unsigned char > & | source | ) | [inline] |