|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
Represents a connected client in the EventRouter. More...
#include <EventRouter.hpp>

Public Member Functions | |
| EventSocket (http::websocket::WebSocketConnection &raw, EventRouter< SessionType > &router, std::string id) | |
| template<typename T > | |
| void | emit (const std::string &event, const T &data) |
| Emits an event with strongly-typed data back to this specific client. | |
| void | join (const std::string &room) |
| Joins a specific room/channel. | |
| void | leave (const std::string &room) |
| Leaves a specific room/channel. | |
| auto | to (const std::string &room) |
| Returns a broadcaster to emit messages to everyone in the room. | |
| SessionType & | session () |
| The strongly-typed session state attached to this connection. | |
| const std::string & | id () const |
| http::websocket::WebSocketConnection & | raw () |
Private Attributes | |
| http::websocket::WebSocketConnection & | raw_ |
| EventRouter< SessionType > & | router_ |
| std::string | id_ |
| SessionType | session_ |
| std::unordered_set< std::string > | rooms_ |
Friends | |
| class | EventRouter< SessionType > |
Represents a connected client in the EventRouter.
|
inline |
|
inline |
Emits an event with strongly-typed data back to this specific client.
|
inline |
| void orbit::websocket::EventSocket< SessionType >::join | ( | const std::string & | room | ) |
Joins a specific room/channel.
| void orbit::websocket::EventSocket< SessionType >::leave | ( | const std::string & | room | ) |
Leaves a specific room/channel.
|
inline |
|
inline |
The strongly-typed session state attached to this connection.
| auto orbit::websocket::EventSocket< SessionType >::to | ( | const std::string & | room | ) |
Returns a broadcaster to emit messages to everyone in the room.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |