![]() |
TrinityCore
|
#include <HttpService.h>
Inheritance diagram for Trinity::Net::Http::HttpService< SessionImpl >:Public Member Functions | |
| HttpService (std::string_view loggerSuffix) | |
| bool | StartNetwork (Asio::IoContext &ioContext, std::string const &bindIp, uint16 port, int32 threadCount=1) override |
| void | StopNetwork () override |
| template<HttpRequestHandler< SessionImpl > Callable> | |
| void | RegisterHandler (boost::beast::http::verb method, std::string_view path, Callable handler, RequestHandlerFlag flags=RequestHandlerFlag::None) |
| virtual std::shared_ptr< SessionState > | CreateNewSessionState (boost::asio::ip::address const &address) |
| void | RegisterHandler (boost::beast::http::verb method, std::string_view path, std::function< RequestHandlerResult(std::shared_ptr< AbstractSocket > session, RequestContext &context)> handler, RequestHandlerFlag flags=RequestHandlerFlag::None) |
Public Member Functions inherited from Trinity::Net::SocketMgr< HttpServiceTraits< SessionImpl > > | |
| SocketMgr (SocketMgr const &)=delete | |
| SocketMgr (SocketMgr &&)=delete | |
| SocketMgr & | operator= (SocketMgr const &)=delete |
| SocketMgr & | operator= (SocketMgr &&)=delete |
| virtual | ~SocketMgr () |
| virtual bool | StartNetwork (Asio::IoContext &ioContext, std::string const &bindIp, uint16 port, int threadCount) |
| void | Wait () |
| virtual void | OnSocketOpen (IoContextTcpSocket &&sock) |
| int32 | GetNetworkThreadCount () const |
| Asio::IoContext * | SelectThreadWithMinConnections () const |
Public Member Functions inherited from Trinity::Net::Http::DispatcherService | |
| DispatcherService (std::string_view loggerSuffix) | |
| RequestHandlerResult | HandleRequest (std::shared_ptr< AbstractSocket > session, RequestContext &context) |
Public Member Functions inherited from Trinity::Net::Http::SessionService | |
| 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 | |
| std::unique_ptr< HttpNetworkThread< SessionImpl >[]> | CreateThreads () const override |
Protected Member Functions inherited from Trinity::Net::SocketMgr< HttpServiceTraits< SessionImpl > > | |
| SocketMgr () | |
Protected Member Functions inherited from Trinity::Net::Http::DispatcherService | |
| void | RegisterHandler (boost::beast::http::verb method, std::string_view path, std::function< RequestHandlerResult(std::shared_ptr< AbstractSocket > session, RequestContext &context)> handler, RequestHandlerFlag flags=RequestHandlerFlag::None) |
Protected Member Functions inherited from Trinity::Net::Http::SessionService | |
| void | InitAndStoreSessionState (std::shared_ptr< SessionState > state, boost::asio::ip::address const &address) |
| void | KillInactiveSessions () |
Protected Attributes | |
| Asio::IoContext * | _ioContext |
| std::string | _logger |
Protected Attributes inherited from Trinity::Net::SocketMgr< HttpServiceTraits< SessionImpl > > | |
| std::unique_ptr< AsyncAcceptor > | _acceptor |
| std::unique_ptr< ThreadType[]> | _threads |
| int32 | _threadCount |
Private Types | |
| using | BaseSocketMgr = SocketMgr< HttpServiceTraits< SessionImpl > > |
Private Attributes | |
| friend | BaseSocketMgr |
Additional Inherited Members | |
Public Types inherited from Trinity::Net::SocketMgr< HttpServiceTraits< SessionImpl > > | |
| using | Self = typename Traits::Self |
| using | SocketType = typename Traits::SocketType |
| using | ThreadType = typename Traits::ThreadType |
Static Public Member Functions inherited from Trinity::Net::Http::DispatcherService | |
| static RequestHandlerResult | HandleBadRequest (std::shared_ptr< AbstractSocket > session, RequestContext &context) |
| static RequestHandlerResult | HandleUnauthorized (std::shared_ptr< AbstractSocket > session, RequestContext &context) |
| static RequestHandlerResult | HandlePathNotFound (std::shared_ptr< AbstractSocket > session, RequestContext &context) |
Definition at line 142 of file HttpService.h.
|
private |
Definition at line 144 of file HttpService.h.
|
inline |
Definition at line 149 of file HttpService.h.
|
inlinevirtual |
Reimplemented in Battlenet::LoginRESTService.
Definition at line 182 of file HttpService.h.
Here is the call graph for this function:
|
inlineoverrideprotectedvirtual |
Reimplemented from Trinity::Net::SocketMgr< HttpServiceTraits< SessionImpl > >.
Definition at line 190 of file HttpService.h.
Here is the call graph for this function:
|
inline |
| void Trinity::Net::Http::DispatcherService::RegisterHandler | ( | boost::beast::http::verb | method, |
| std::string_view | path, | ||
| std::function< RequestHandlerResult(std::shared_ptr< AbstractSocket > session, RequestContext &context)> | handler, | ||
| RequestHandlerFlag | flags = RequestHandlerFlag::None |
||
| ) |
Definition at line 69 of file HttpService.cpp.
|
inlineoverride |
|
inlineoverridevirtual |
Reimplemented from Trinity::Net::SocketMgr< HttpServiceTraits< SessionImpl > >.
Definition at line 163 of file HttpService.h.
Here is the call graph for this function:
|
protected |
Definition at line 198 of file HttpService.h.
|
protected |
Definition at line 199 of file HttpService.h.
|
private |
Definition at line 146 of file HttpService.h.