|
EHS Embedded HTTP Server
1.5.0.132
|
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.
| 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 parser::consume(), parser::ready(), parser::is_control(), parser::reset(), wserror::code(), 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::set_opcode(), parser::set_fin(), parser::set_masked(), parser::set_payload(), parser::get_header_str(), and parser::get_payload_str().
Here is the call graph for this function: