![]() |
TrinityCore
|
#include <BaseHttpSocket.h>
Public Member Functions | |
template<typename... Args> | |
BaseSocket (boost::asio::ip::tcp::socket &&socket, Args &&... args) | |
BaseSocket (BaseSocket const &other)=delete | |
BaseSocket (BaseSocket &&other)=delete | |
BaseSocket & | operator= (BaseSocket const &other)=delete |
BaseSocket & | operator= (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 |
![]() | |
Socket (boost::asio::ip::tcp::socket &&socket, Args &&... args) | |
Socket (Socket const &other)=delete | |
Socket (Socket &&other)=delete | |
Socket & | operator= (Socket const &other)=delete |
Socket & | operator= (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... | |
MessageBuffer & | GetReadBuffer () |
![]() | |
AbstractSocket ()=default | |
AbstractSocket (AbstractSocket const &other)=default | |
AbstractSocket (AbstractSocket &&other)=default | |
AbstractSocket & | operator= (AbstractSocket const &other)=default |
AbstractSocket & | operator= (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 |
Protected Member Functions | |
void | ResetHttpParser () |
virtual std::shared_ptr< SessionState > | ObtainSessionState (RequestContext &context) const =0 |
![]() | |
virtual void | OnClose () |
virtual void | ReadHandler ()=0 |
bool | AsyncProcessQueue () |
void | SetNoDelay (bool enable) |
Stream & | underlying_stream () |
Protected Attributes | |
QueryCallbackProcessor | _queryProcessor |
Optional< RequestParser > | _httpParser |
std::shared_ptr< SessionState > | _state |
Private Types | |
using | Base = ::Socket< Derived, Stream > |
Additional Inherited Members | |
![]() | |
static bool | ParseRequest (MessageBuffer &packet, RequestParser &parser) |
static std::string | SerializeRequest (Request const &request) |
static MessageBuffer | SerializeResponse (Request const &request, Response &response) |
Definition at line 62 of file BaseHttpSocket.h.
|
private |
Definition at line 64 of file BaseHttpSocket.h.
|
inlineexplicit |
Definition at line 68 of file BaseHttpSocket.h.
|
delete |
|
delete |
|
default |
|
inlineoverridevirtual |
Implements Trinity::Net::Http::AbstractSocket.
Definition at line 155 of file BaseHttpSocket.h.
|
inlinefinalvirtual |
Implements Trinity::Net::Http::AbstractSocket.
Definition at line 167 of file BaseHttpSocket.h.
|
inline |
Definition at line 104 of file BaseHttpSocket.h.
|
protectedpure virtual |
|
delete |
|
delete |
|
inlineoverridevirtual |
Implements Trinity::Net::Http::AbstractSocket.
Definition at line 141 of file BaseHttpSocket.h.
|
inlineoverridevirtual |
Implements Socket< Derived, Stream >.
Definition at line 78 of file BaseHttpSocket.h.
|
pure virtual |
|
inlineprotected |
|
inlineoverridevirtual |
Implements Trinity::Net::Http::AbstractSocket.
Definition at line 121 of file BaseHttpSocket.h.
|
inlineoverridevirtual |
Reimplemented from Socket< Derived, Stream >.
Definition at line 146 of file BaseHttpSocket.h.
|
protected |
Definition at line 186 of file BaseHttpSocket.h.
|
protected |
Definition at line 185 of file BaseHttpSocket.h.
|
protected |
Definition at line 187 of file BaseHttpSocket.h.