TrinityCore
Trinity::Net::Http::AbstractSocket Class Referenceabstract

#include <BaseHttpSocket.h>

+ Inheritance diagram for Trinity::Net::Http::AbstractSocket:

Public Member Functions

 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
 
void LogRequestAndResponse (RequestContext const &context, MessageBuffer &buffer) const
 
virtual std::string GetClientInfo () const =0
 
virtual SessionStateGetSessionState () const =0
 
Optional< boost::uuids::uuid > GetSessionId () const
 
virtual void Start ()=0
 
virtual bool Update ()=0
 
virtual boost::asio::ip::address const & GetRemoteIpAddress () const =0
 
virtual bool IsOpen () const =0
 
virtual void CloseSocket ()=0
 

Static Public Member Functions

static bool ParseRequest (MessageBuffer &packet, RequestParser &parser)
 
static bool ParseResponse (MessageBuffer &packet, ResponseParser &parser)
 
static MessageBuffer SerializeRequest (Request const &request)
 
static MessageBuffer SerializeResponse (Request const &request, Response const &response)
 
static std::string GetClientInfo (boost::asio::ip::address const &address, uint16 port, SessionState const *state)
 

Detailed Description

Definition at line 78 of file BaseHttpSocket.h.

Constructor & Destructor Documentation

◆ AbstractSocket() [1/3]

Trinity::Net::Http::AbstractSocket::AbstractSocket ( )
default

◆ AbstractSocket() [2/3]

Trinity::Net::Http::AbstractSocket::AbstractSocket ( AbstractSocket const &  other)
default

◆ AbstractSocket() [3/3]

Trinity::Net::Http::AbstractSocket::AbstractSocket ( AbstractSocket &&  other)
default

◆ ~AbstractSocket()

virtual Trinity::Net::Http::AbstractSocket::~AbstractSocket ( )
virtualdefault

Member Function Documentation

◆ CloseSocket()

◆ GetClientInfo() [1/2]

virtual std::string Trinity::Net::Http::AbstractSocket::GetClientInfo ( ) const
pure virtual

Implemented in Trinity::Net::Http::BaseSocket< Stream >, Trinity::Net::Http::BaseSocket< Impl::BoostBeastSocketWrapper >, Trinity::Net::Http::BaseSocket< SslStream< Impl::BoostBeastSocketWrapper > >, and Battlenet::LoginHttpSession.

+ Here is the caller graph for this function:

◆ GetClientInfo() [2/2]

std::string Trinity::Net::Http::AbstractSocket::GetClientInfo ( boost::asio::ip::address const &  address,
uint16  port,
SessionState const *  state 
)
static

Definition at line 165 of file BaseHttpSocket.cpp.

+ Here is the call graph for this function:

◆ GetRemoteIpAddress()

virtual boost::asio::ip::address const & Trinity::Net::Http::AbstractSocket::GetRemoteIpAddress ( ) const
pure virtual

◆ GetSessionId()

Optional< boost::uuids::uuid > Trinity::Net::Http::AbstractSocket::GetSessionId ( ) const
inline

Definition at line 104 of file BaseHttpSocket.h.

◆ GetSessionState()

◆ IsOpen()

◆ LogRequestAndResponse()

void Trinity::Net::Http::AbstractSocket::LogRequestAndResponse ( RequestContext const &  context,
MessageBuffer buffer 
) const

Definition at line 138 of file BaseHttpSocket.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

AbstractSocket & Trinity::Net::Http::AbstractSocket::operator= ( AbstractSocket &&  other)
default

◆ operator=() [2/2]

AbstractSocket & Trinity::Net::Http::AbstractSocket::operator= ( AbstractSocket const &  other)
default

◆ ParseRequest()

bool Trinity::Net::Http::AbstractSocket::ParseRequest ( MessageBuffer packet,
RequestParser parser 
)
static

Definition at line 28 of file BaseHttpSocket.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseResponse()

bool Trinity::Net::Http::AbstractSocket::ParseResponse ( MessageBuffer packet,
ResponseParser parser 
)
static

Definition at line 41 of file BaseHttpSocket.cpp.

+ Here is the call graph for this function:

◆ SendResponse()

◆ SerializeRequest()

MessageBuffer Trinity::Net::Http::AbstractSocket::SerializeRequest ( Request const &  request)
static

Definition at line 54 of file BaseHttpSocket.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SerializeResponse()

MessageBuffer Trinity::Net::Http::AbstractSocket::SerializeResponse ( Request const &  request,
Response const &  response 
)
static

Definition at line 91 of file BaseHttpSocket.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Start()

◆ Update()


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