Public Member Functions | List of all members
WsWebApp Class Referenceabstract

Abstract base class of WebSocket web application handlers. More...

#include <WsWebApp.hpp>

Inheritance diagram for WsWebApp:
[legend]

Public Member Functions

virtual ~WsWebApp ()=default
 Destroy the WebSocket web application instance. More...
 
virtual void handleBinaryMessage (WsSession &session, std::string_view path)=0
 Handle received binary data. More...
 
virtual void handleClose (WsSession &session, std::string_view path)=0
 Handle a received close control message. More...
 
virtual void handlePing (WsSession &session, std::string_view path)=0
 Handle a received ping control message. More...
 
virtual void handlePong (WsSession &session, std::string_view path)=0
 Handle a received pong control message. More...
 
virtual void handleTextMessage (WsSession &session, std::string_view path)=0
 Handle received text data. More...
 

Detailed Description

Abstract base class of WebSocket web application handlers.

All concrete HTTP web applications must have a constructor of the following signature:

const EnvironmentProperties & configuration

This constructor will be used to instantiate the web application during initialisation of the HTTP server.

Constructor & Destructor Documentation

◆ ~WsWebApp()

virtual ~WsWebApp ( )
virtualdefault

Destroy the WebSocket web application instance.

Member Function Documentation

◆ handleBinaryMessage()

virtual void handleBinaryMessage ( WsSession session,
std::string_view  path 
)
pure virtual

Handle received binary data.

Implemented in RoutingWsWebApp, EchoingWsWebApp, and NullWsWebApp.

◆ handleClose()

virtual void handleClose ( WsSession session,
std::string_view  path 
)
pure virtual

Handle a received close control message.

Implemented in RoutingWsWebApp, EchoingWsWebApp, and NullWsWebApp.

◆ handlePing()

virtual void handlePing ( WsSession session,
std::string_view  path 
)
pure virtual

Handle a received ping control message.

Implemented in RoutingWsWebApp, EchoingWsWebApp, and NullWsWebApp.

◆ handlePong()

virtual void handlePong ( WsSession session,
std::string_view  path 
)
pure virtual

Handle a received pong control message.

Implemented in RoutingWsWebApp, EchoingWsWebApp, and NullWsWebApp.

◆ handleTextMessage()

virtual void handleTextMessage ( WsSession session,
std::string_view  path 
)
pure virtual

Handle received text data.

Implemented in RoutingWsWebApp, EchoingWsWebApp, and NullWsWebApp.


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