|
| SslHttpSession (tcp::socket &&socket, std::string const &ip, std::shared_ptr< AdminVerificationStrategy > const &adminVerification, boost::asio::ssl::context &ctx, std::reference_wrapper< util::TagDecoratorFactory const > tagFactory, std::reference_wrapper< dosguard::DOSGuardInterface > dosGuard, std::shared_ptr< HandlerType > const &handler, boost::beast::flat_buffer buffer, std::uint32_t maxWsSendingQueueSize) |
| Create a new SSL session.
|
|
boost::beast::ssl_stream< boost::beast::tcp_stream > & | stream () |
|
void | run () |
| Initiates the handshake.
|
|
void | onHandshake (boost::beast::error_code ec, std::size_t bytesUsed) |
| Handles the handshake.
|
|
void | doClose () |
| Closes the underlying connection.
|
|
void | onShutdown (boost::beast::error_code ec) |
| Handles a connection shutdown.
|
|
void | upgrade () |
| Upgrades connection to secure websocket.
|
|
| HttpBase (std::string const &ip, std::reference_wrapper< util::TagDecoratorFactory const > tagFactory, std::shared_ptr< AdminVerificationStrategy > adminVerification, std::reference_wrapper< dosguard::DOSGuardInterface > dosGuard, std::shared_ptr< HandlerType > handler, boost::beast::flat_buffer buffer) |
|
void | doRead () |
|
void | onRead (boost::beast::error_code ec, std::size_t bytesTransferred) |
|
void | send (std::string &&msg, http::status status=http::status::ok) override |
| Send a response to the client The message length will be added to the DOSGuard, if the limit is reached, a warning will be added to the response.
|
|
SubscriptionContextPtr | makeSubscriptionContext (util::TagDecoratorFactory const &) override |
| Get the subscription context for this connection.
|
|
void | onWrite (bool close, boost::beast::error_code ec, std::size_t bytesTransferred) |
|
| ConnectionBase (util::TagDecoratorFactory const &tagFactory, std::string ip) |
| Create a new connection base.
|
|
virtual void | send (std::shared_ptr< std::string > msg) |
| Send via shared_ptr of string, that enables SubscriptionManager to publish to clients.
|
|
bool | dead () |
| Indicates whether the connection had an error and is considered dead.
|
|
bool | isAdmin () const |
| Indicates whether the connection has admin privileges.
|
|
| Taggable (Taggable &&)=default |
|
Taggable & | operator= (Taggable &&)=default |
|
BaseTagDecorator const & | tag () const |
| Getter for tag decorator.
|
|
template<SomeServerHandler HandlerType>
class web::SslHttpSession< HandlerType >
Represents a HTTPS connection established by a client.
It will handle the upgrade to secure websocket, pass the ownership of the socket to the upgrade session. Otherwise, it will pass control to the base class.
- Template Parameters
-
HandlerType | The type of the server handler to use |