TrinityCore
Battlenet::LoginHttpSession Class Reference

#include <LoginHttpSession.h>

+ Inheritance diagram for Battlenet::LoginHttpSession:

Public Member Functions

 LoginHttpSession (boost::asio::ip::tcp::socket &&socket)
 
 ~LoginHttpSession ()
 
void Start () override
 
void CheckIpCallback (PreparedQueryResult result)
 
Trinity::Net::Http::RequestHandlerResult RequestHandler (Trinity::Net::Http::RequestContext &context) override
 
LoginSessionStateGetSessionState () const
 
- Public Member Functions inherited from Trinity::Net::Http::SslSocket< LoginHttpSession >
 SslSocket (boost::asio::ip::tcp::socket &&socket, boost::asio::ssl::context &sslContext)
 
 SslSocket (SslSocket const &other)=delete
 
 SslSocket (SslSocket &&other)=delete
 
SslSocketoperator= (SslSocket const &other)=delete
 
SslSocketoperator= (SslSocket &&other)=delete
 
 ~SslSocket ()=default
 
void Start () override
 
void AsyncHandshake ()
 
void HandshakeHandler (boost::system::error_code const &error)
 
- Public Member Functions inherited from Trinity::Net::Http::BaseSocket< LoginHttpSession, Impl::BoostBeastSslSocketWrapper >
 BaseSocket (boost::asio::ip::tcp::socket &&socket, Args &&... args)
 
 BaseSocket (BaseSocket const &other)=delete
 
 BaseSocket (BaseSocket &&other)=delete
 
BaseSocketoperator= (BaseSocket const &other)=delete
 
BaseSocketoperator= (BaseSocket &&other)=delete
 
 ~BaseSocket ()=default
 
void ReadHandler () override
 
bool HandleMessage (Request &request)
 
virtual RequestHandlerResult RequestHandler (RequestContext &context)=0
 
void SendResponse (RequestContext &context) override
 
void QueueQuery (QueryCallback &&queryCallback) override
 
bool Update () override
 
std::string GetClientInfo () const override
 
Optional< boost::uuids::uuid > GetSessionId () const final
 
- Public Member Functions inherited from Socket< LoginHttpSession, Impl::BoostBeastSslSocketWrapper >
 Socket (boost::asio::ip::tcp::socket &&socket, Args &&... args)
 
 Socket (Socket const &other)=delete
 
 Socket (Socket &&other)=delete
 
Socketoperator= (Socket const &other)=delete
 
Socketoperator= (Socket &&other)=delete
 
virtual ~Socket ()
 
virtual void Start ()=0
 
virtual bool Update ()
 
boost::asio::ip::address GetRemoteIpAddress () const
 
uint16 GetRemotePort () const
 
void AsyncRead ()
 
void AsyncReadWithCallback (void(T::*callback)(boost::system::error_code const &, std::size_t))
 
void QueuePacket (MessageBuffer &&buffer)
 
bool IsOpen () const
 
void CloseSocket ()
 
void DelayedCloseSocket ()
 Marks the socket for closing after write buffer becomes empty. More...
 
MessageBufferGetReadBuffer ()
 
- Public Member Functions inherited from Trinity::Net::Http::AbstractSocket
 AbstractSocket ()=default
 
 AbstractSocket (AbstractSocket const &other)=default
 
 AbstractSocket (AbstractSocket &&other)=default
 
AbstractSocketoperator= (AbstractSocket const &other)=default
 
AbstractSocketoperator= (AbstractSocket &&other)=default
 
virtual ~AbstractSocket ()=default
 
virtual void SendResponse (RequestContext &context)=0
 
virtual void QueueQuery (QueryCallback &&queryCallback)=0
 
virtual std::string GetClientInfo () const =0
 
virtual Optional< boost::uuids::uuid > GetSessionId () const =0
 

Static Public Attributes

static constexpr std::string_view SESSION_ID_COOKIE = "JSESSIONID"
 

Protected Member Functions

std::shared_ptr< Trinity::Net::Http::SessionStateObtainSessionState (Trinity::Net::Http::RequestContext &context) const override
 
- Protected Member Functions inherited from Trinity::Net::Http::BaseSocket< LoginHttpSession, Impl::BoostBeastSslSocketWrapper >
void ResetHttpParser ()
 
virtual std::shared_ptr< SessionStateObtainSessionState (RequestContext &context) const=0
 
- Protected Member Functions inherited from Socket< LoginHttpSession, Impl::BoostBeastSslSocketWrapper >
virtual void OnClose ()
 
virtual void ReadHandler ()=0
 
bool AsyncProcessQueue ()
 
void SetNoDelay (bool enable)
 
Impl::BoostBeastSslSocketWrapper & underlying_stream ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Trinity::Net::Http::AbstractSocket
static bool ParseRequest (MessageBuffer &packet, RequestParser &parser)
 
static std::string SerializeRequest (Request const &request)
 
static MessageBuffer SerializeResponse (Request const &request, Response &response)
 
- Protected Attributes inherited from Trinity::Net::Http::BaseSocket< LoginHttpSession, Impl::BoostBeastSslSocketWrapper >
QueryCallbackProcessor _queryProcessor
 
Optional< RequestParser_httpParser
 
std::shared_ptr< SessionState_state
 

Detailed Description

Definition at line 31 of file LoginHttpSession.h.

Constructor & Destructor Documentation

◆ LoginHttpSession()

Battlenet::LoginHttpSession::LoginHttpSession ( boost::asio::ip::tcp::socket &&  socket)
explicit

Definition at line 26 of file LoginHttpSession.cpp.

◆ ~LoginHttpSession()

Battlenet::LoginHttpSession::~LoginHttpSession ( )
default

Member Function Documentation

◆ CheckIpCallback()

void Battlenet::LoginHttpSession::CheckIpCallback ( PreparedQueryResult  result)

Definition at line 48 of file LoginHttpSession.cpp.

+ Here is the call graph for this function:

◆ GetSessionState()

LoginSessionState * Battlenet::LoginHttpSession::GetSessionState ( ) const
inline

Definition at line 45 of file LoginHttpSession.h.

◆ ObtainSessionState()

std::shared_ptr< Trinity::Net::Http::SessionState > Battlenet::LoginHttpSession::ObtainSessionState ( Trinity::Net::Http::RequestContext context) const
overrideprotectedvirtual

Implements Trinity::Net::Http::BaseSocket< LoginHttpSession, Impl::BoostBeastSslSocketWrapper >.

Definition at line 77 of file LoginHttpSession.cpp.

+ Here is the call graph for this function:

◆ RequestHandler()

Trinity::Net::Http::RequestHandlerResult Battlenet::LoginHttpSession::RequestHandler ( Trinity::Net::Http::RequestContext context)
overridevirtual

◆ Start()

void Battlenet::LoginHttpSession::Start ( )
overridevirtual

Implements Socket< LoginHttpSession, Impl::BoostBeastSslSocketWrapper >.

Definition at line 33 of file LoginHttpSession.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ SESSION_ID_COOKIE

constexpr std::string_view Battlenet::LoginHttpSession::SESSION_ID_COOKIE = "JSESSIONID"
staticconstexpr

Definition at line 34 of file LoginHttpSession.h.


The documentation for this class was generated from the following files: