![]() |
TrinityCore
|
#include <HttpService.h>
Inheritance diagram for Trinity::Net::Http::SessionService:Public Member Functions | |
| SessionService (std::string_view loggerSuffix) | |
| void | Start (Asio::IoContext &ioContext) |
| void | Stop () |
| std::shared_ptr< SessionState > | FindAndRefreshSessionState (std::string_view id, boost::asio::ip::address const &address) |
| void | MarkSessionInactive (boost::uuids::uuid const &id) |
Protected Member Functions | |
| void | InitAndStoreSessionState (std::shared_ptr< SessionState > state, boost::asio::ip::address const &address) |
| void | KillInactiveSessions () |
Private Attributes | |
| std::shared_mutex | _sessionsMutex |
| std::map< boost::uuids::uuid, std::shared_ptr< SessionState > > | _sessions |
| std::mutex | _inactiveSessionsMutex |
| std::set< boost::uuids::uuid > | _inactiveSessions |
| std::unique_ptr< Asio::DeadlineTimer > | _inactiveSessionsKillTimer |
| std::string | _logger |
Definition at line 82 of file HttpService.h.
|
inlineexplicit |
Definition at line 85 of file HttpService.h.
| std::shared_ptr< SessionState > Trinity::Net::Http::SessionService::FindAndRefreshSessionState | ( | std::string_view | id, |
| boost::asio::ip::address const & | address | ||
| ) |
Definition at line 169 of file HttpService.cpp.
|
protected |
Definition at line 127 of file HttpService.cpp.
References _logger, _sessions, _sessionsMutex, and TC_LOG_DEBUG.
Referenced by Trinity::Net::Http::HttpService< SessionImpl >::CreateNewSessionState().
|
protected |
Definition at line 220 of file HttpService.cpp.
References _inactiveSessions, _inactiveSessionsKillTimer, _inactiveSessionsMutex, _logger, _sessions, _sessionsMutex, KillInactiveSessions(), and TC_LOG_DEBUG.
Referenced by KillInactiveSessions(), and Start().
| void Trinity::Net::Http::SessionService::MarkSessionInactive | ( | boost::uuids::uuid const & | id | ) |
Definition at line 200 of file HttpService.cpp.
References _inactiveSessions, _inactiveSessionsMutex, _logger, _sessions, _sessionsMutex, and TC_LOG_TRACE.
| void Trinity::Net::Http::SessionService::Start | ( | Asio::IoContext & | ioContext | ) |
Definition at line 143 of file HttpService.cpp.
References _inactiveSessionsKillTimer, and KillInactiveSessions().
Referenced by Trinity::Net::Http::HttpService< SessionImpl >::StartNetwork().
| void Trinity::Net::Http::SessionService::Stop | ( | ) |
Definition at line 156 of file HttpService.cpp.
References _inactiveSessions, _inactiveSessionsKillTimer, _inactiveSessionsMutex, _sessions, and _sessionsMutex.
Referenced by Trinity::Net::Http::HttpService< SessionImpl >::StopNetwork().
|
private |
Definition at line 106 of file HttpService.h.
Referenced by KillInactiveSessions(), MarkSessionInactive(), Trinity::Net::Http::HttpService< LoginHttpSession >::RegisterHandler(), and Stop().
|
private |
Definition at line 107 of file HttpService.h.
Referenced by KillInactiveSessions(), Start(), and Stop().
|
private |
Definition at line 105 of file HttpService.h.
Referenced by KillInactiveSessions(), MarkSessionInactive(), Trinity::Net::Http::HttpService< LoginHttpSession >::RegisterHandler(), and Stop().
|
private |
Definition at line 109 of file HttpService.h.
Referenced by InitAndStoreSessionState(), KillInactiveSessions(), MarkSessionInactive(), and Trinity::Net::Http::HttpService< LoginHttpSession >::RegisterHandler().
|
private |
Definition at line 103 of file HttpService.h.
Referenced by InitAndStoreSessionState(), KillInactiveSessions(), MarkSessionInactive(), Trinity::Net::Http::HttpService< LoginHttpSession >::RegisterHandler(), and Stop().
|
private |
Definition at line 102 of file HttpService.h.
Referenced by InitAndStoreSessionState(), KillInactiveSessions(), MarkSessionInactive(), Trinity::Net::Http::HttpService< LoginHttpSession >::RegisterHandler(), and Stop().