|
|
virtual std::expected< bool, Error > | isUpgradeRequested (boost::asio::yield_context yield)=0 |
|
virtual std::expected< ConnectionPtr, Error > | upgrade (util::TagDecoratorFactory const &tagDecoratorFactory, boost::asio::yield_context yield)=0 |
|
virtual std::expected< void, Error > | sendRaw (boost::beast::http::response< boost::beast::http::string_body > response, boost::asio::yield_context yield)=0 |
| | 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.
|
| virtual void | setTimeout (std::chrono::steady_clock::duration newTimeout)=0 |
| | Get the timeout for send, receive, and close operations. For WebSocket connections, this is the ping interval.
|
| virtual std::expected< void, Error > | send (Response response, boost::asio::yield_context yield)=0 |
| | Send a response to the client.
|
| virtual std::expected< Request, Error > | receive (boost::asio::yield_context yield)=0 |
| | Receive a request from the client.
|
| virtual void | close (boost::asio::yield_context yield)=0 |
| | Gracefully close the connection.
|
| | ConnectionMetadata (std::string ip, util::TagDecoratorFactory const &tagDecoratorFactory) |
| | Construct a new ConnectionMetadata object.
|
| virtual bool | wasUpgraded () const =0 |
| | Whether the connection was upgraded. Upgraded connections are websocket connections.
|
| 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.
|