|
EHS Embedded HTTP Server
1.5.1.173
|
This class implements a server-side WebSockets endpoint. More...
#include <wsendpoint.h>
Public Member Functions | |
| wsendpoint (wshandler *h) | |
| Constructor. | |
| void | AddRxData (std::string data) |
| Processes incoming data from the client. | |
| void | send (const std::string &payload, frame::opcode::value op) |
| Send a data message. | |
This class implements a server-side WebSockets endpoint.
Definition at line 127 of file wsendpoint.h.
| wsendpoint | ( | wshandler * | h | ) | [inline] |
Constructor.
| h | The corresponding wshandler instance. |
Definition at line 138 of file wsendpoint.h.
| void AddRxData | ( | std::string | data | ) | [inline] |
Processes incoming data from the client.
The incoming data is decoded, according to RFC6455. If any message is completely assembled, the on_message method of the corresponding wshandler is invoked. For internal replys (e.g. PONG responses) the do_response method of the corresponding wshandler is used. All other on_xxx methods are called when the corresponding events occur.
| data | the raw data, received from the client. |
Definition at line 170 of file wsendpoint.h.
References wserror::code(), parser< rng_policy >::consume(), parser< rng_policy >::is_control(), parser< rng_policy >::ready(), parser< rng_policy >::reset(), and wserror::what().
Here is the call graph for this function:| void send | ( | const std::string & | payload, |
| frame::opcode::value | op | ||
| ) | [inline] |
Send a data message.
This method is invoked from the corresponding wshandler in order to send TEXT and BINARY payloads.
| payload | The payload data. |
| op | The opcode according to RFC6455 |
Definition at line 229 of file wsendpoint.h.
References parser< rng_policy >::get_header_str(), parser< rng_policy >::get_payload_str(), parser< rng_policy >::set_fin(), parser< rng_policy >::set_masked(), parser< rng_policy >::set_opcode(), and parser< rng_policy >::set_payload().
Here is the call graph for this function: