MantisBase v0.4.9
Loading...
Searching...
No Matches
mb::MbRealtimeWSController Class Reference

Drogon WebSocket controller for the realtime endpoint. More...

#include <ws.h>

Inheritance diagram for mb::MbRealtimeWSController:
Collaboration diagram for mb::MbRealtimeWSController:

Public Member Functions

 MbRealtimeWSController (const MantisBase &app)
void handleNewMessage (const drogon::WebSocketConnectionPtr &, std::string &&, const drogon::WebSocketMessageType &) override
void handleNewConnection (const drogon::HttpRequestPtr &, const drogon::WebSocketConnectionPtr &) override
void handleConnectionClosed (const drogon::WebSocketConnectionPtr &) override
WS_PATH_LIST_BEGIN WS_PATH_ADD ("/api/v1/realtime/ws")

Detailed Description

Drogon WebSocket controller for the realtime endpoint.

Registered at WS /api/v1/realtime/ws. Disabled when MB_DISABLE_REALTIME_WS is truthy.

Constructor & Destructor Documentation

◆ MbRealtimeWSController()

mb::MbRealtimeWSController::MbRealtimeWSController ( const MantisBase & app)
inlineexplicit

Member Function Documentation

◆ handleConnectionClosed()

void mb::MbRealtimeWSController::handleConnectionClosed ( const drogon::WebSocketConnectionPtr & conn)
override

Tear down session state when the client disconnects.

◆ handleNewConnection()

void mb::MbRealtimeWSController::handleNewConnection ( const drogon::HttpRequestPtr & req,
const drogon::WebSocketConnectionPtr & conn )
override

Optional auth at connect; sends welcome with client_id and empty topics.

◆ handleNewMessage()

void mb::MbRealtimeWSController::handleNewMessage ( const drogon::WebSocketConnectionPtr & conn,
std::string && message,
const drogon::WebSocketMessageType & type )
override

Handle subscribe, unsubscribe, ping, and auth-upgrade messages.

◆ WS_PATH_ADD()

WS_PATH_LIST_BEGIN mb::MbRealtimeWSController::WS_PATH_ADD ( "/api/v1/realtime/ws" )

The documentation for this class was generated from the following files:
  • /home/runner/work/mantisbase/mantisbase/include/mantisbase/core/ws.h
  • /home/runner/work/mantisbase/mantisbase/src/core/realtime_ws.cpp