|
|
| WsConnection (StreamType &&stream, std::string ip, boost::beast::flat_buffer buffer, boost::beast::http::request< boost::beast::http::string_body > initialRequest, util::TagDecoratorFactory const &tagDecoratorFactory) |
|
| WsConnection (WsConnection &&)=delete |
|
WsConnection & | operator= (WsConnection &&)=delete |
|
| WsConnection (WsConnection const &)=delete |
|
WsConnection & | operator= (WsConnection const &)=delete |
|
std::expected< void, Error > | performHandshake (boost::asio::yield_context yield) |
| bool | wasUpgraded () const override |
| | Whether the connection was upgraded. Upgraded connections are websocket connections.
|
| std::expected< void, Error > | sendShared (std::shared_ptr< std::string > message, boost::asio::yield_context yield) override |
| void | setTimeout (std::chrono::steady_clock::duration newTimeout) override |
| | Get the timeout for send, receive, and close operations. For WebSocket connections, this is the ping interval.
|
| std::expected< void, Error > | send (Response response, boost::asio::yield_context yield) override |
| | Send a response to the client.
|
| std::expected< Request, Error > | receive (boost::asio::yield_context yield) override |
| | Receive a request from the client.
|
| void | close (boost::asio::yield_context yield) override |
| | Gracefully close the connection.
|
| | Connection (std::string ip, boost::beast::flat_buffer buffer, util::TagDecoratorFactory const &tagDecoratorFactory) |
| | Construct a new Connection object.
|
| | Connection (std::string ip, boost::beast::flat_buffer buffer, util::TagDecoratorFactory const &tagDecoratorFactory) |
| | Construct a new Connection object.
|
| | ConnectionMetadata (std::string ip, util::TagDecoratorFactory const &tagDecoratorFactory) |
| | Construct a new ConnectionMetadata object.
|
| std::string const & | ip () const |
| | Get the ip of the client.
|
| void | setIp (std::string newIp) |
| | Set the ip of the client.
|
| bool | isAdmin () const |
| | Get whether the client is an admin.
|
| template<std::invocable T> |
| void | setIsAdmin (T &&setter) |
| | Set the isAdmin field.
|
|
| Taggable (Taggable &&)=default |
|
Taggable & | operator= (Taggable &&)=default |
| BaseTagDecorator const & | tag () const |
| | Getter for tag decorator.
|