|
Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web 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 () |
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 websocket::EventSocket< SessionType >::join | ( | const std::string & | room | ) |
Joins a specific room/channel.
| void 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 websocket::EventSocket< SessionType >::to | ( | const std::string & | room | ) |
Returns a broadcaster to emit messages to everyone in the room.
|
friend |