EHS Embedded HTTP Server  1.5.1.173
wshandler Class Referenceabstract

Event handler interface for the server-side WebSockets endpoint. More...

#include <wsendpoint.h>

Public Member Functions

void send_text (const std::string &data)
 Send a text message to the remote client. More...
 
void send_binary (const std::string &data)
 Send a binary message to the remote client. More...
 
 wshandler ()
 Constructor.
 
virtual ~wshandler ()
 Destructor.
 

Friends

class wsendpoint
 

Detailed Description

Event handler interface for the server-side WebSockets endpoint.

This class is used as the API for working with a server-side WebSockets endpoint. An application has to derive a specific implementation from this class, implementing the various pure virtual methods.

Examples:
ehs_wsgate.cpp.

Definition at line 83 of file wsendpoint.h.

Member Function Documentation

◆ send_binary()

void send_binary ( const std::string &  data)
inline

Send a binary message to the remote client.

Parameters
dataThe payload to send.

Definition at line 97 of file wsendpoint.h.

◆ send_text()

void send_text ( const std::string &  data)
inline

Send a text message to the remote client.

Parameters
dataThe payload to send.

Definition at line 89 of file wsendpoint.h.


The documentation for this class was generated from the following file: