An interface for a connection metadata class.
More...
#include <Connection.hpp>
|
std::string | ip_ |
|
std::optional< bool > | isAdmin_ |
|
An interface for a connection metadata class.
◆ ConnectionMetadata()
Construct a new ConnectionMetadata object.
- Parameters
-
ip | The client ip. |
tagDecoratorFactory | The factory for creating tag decorators. |
◆ ip()
std::string const & web::ng::ConnectionMetadata::ip |
( |
| ) |
const |
Get the ip of the client.
- Returns
- The ip of the client.
◆ isAdmin()
bool web::ng::ConnectionMetadata::isAdmin |
( |
| ) |
const |
Get whether the client is an admin.
- Returns
- true if the client is an admin.
◆ setIsAdmin()
template<std::invocable T>
void web::ng::ConnectionMetadata::setIsAdmin |
( |
T && | setter | ) |
|
|
inline |
Set the isAdmin field.
- Note
- This function is lazy, it will update isAdmin only if it is not set yet.
- Template Parameters
-
T | The invocable type of the function to call to set the isAdmin. |
- Parameters
-
setter | The function to call to set the isAdmin. |
◆ wasUpgraded()
virtual bool web::ng::ConnectionMetadata::wasUpgraded |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following files:
- /__w/clio/clio/src/web/ng/Connection.hpp
- /__w/clio/clio/src/web/ng/Connection.cpp