Otclient  14/8/2020
ProtocolHttp Class Reference

#include <protocolhttp.h>

Inheritance diagram for ProtocolHttp:
Collaboration diagram for ProtocolHttp:

Public Member Functions

 ProtocolHttp ()
 
virtual ~ProtocolHttp ()
 
void connect (const std::string &host, uint16 port)
 
void disconnect ()
 
void send (const std::string &message)
 
void recv ()
 
ProtocolHttpPtr asProtocolHttp ()
 
- Public Member Functions inherited from LuaObject
 LuaObject ()
 
virtual ~LuaObject ()
 
template<typename T >
void connectLuaField (const std::string &field, const std::function< T > &f, bool pushFront=false)
 
template<typename... T>
int luaCallLuaField (const std::string &field, const T &... args)
 
template<typename R , typename... T>
callLuaField (const std::string &field, const T &... args)
 
template<typename... T>
void callLuaField (const std::string &field, const T &... args)
 
bool hasLuaField (const std::string &field)
 Returns true if the lua field exists. More...
 
template<typename T >
void setLuaField (const std::string &key, const T &value)
 Sets a field in this lua object. More...
 
template<typename T >
getLuaField (const std::string &key)
 Gets a field from this lua object. More...
 
void releaseLuaFieldsTable ()
 Release fields table reference. More...
 
void luaSetField (const std::string &key)
 Sets a field from this lua object, the value must be on the stack. More...
 
void luaGetField (const std::string &key)
 Gets a field from this lua object, the result is pushed onto the stack. More...
 
void luaGetMetatable ()
 Get object's metatable. More...
 
void luaGetFieldsTable ()
 Gets the table containing all stored fields of this lua object, the result is pushed onto the stack. More...
 
int getUseCount ()
 
std::string getClassName ()
 Returns the derived class name, its the same name used in Lua. More...
 
LuaObjectPtr asLuaObject ()
 
void operator= (const LuaObject &)
 
- Public Member Functions inherited from stdext::shared_object
 shared_object ()
 
virtual ~shared_object ()
 
void add_ref ()
 
void dec_ref ()
 
refcount_t ref_count ()
 
template<typename T >
stdext::shared_object_ptr< T > static_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > dynamic_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > const_self_cast ()
 

Protected Member Functions

void onConnect ()
 
void onRecv (uint8 *buffer, uint16 size)
 
void onError (const boost::system::error_code &err)
 

Detailed Description

Definition at line 32 of file protocolhttp.h.

Constructor & Destructor Documentation

◆ ProtocolHttp()

ProtocolHttp::ProtocolHttp ( )

Definition at line 27 of file protocolhttp.cpp.

◆ ~ProtocolHttp()

ProtocolHttp::~ProtocolHttp ( )
virtual

Definition at line 31 of file protocolhttp.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ asProtocolHttp()

ProtocolHttpPtr ProtocolHttp::asProtocolHttp ( )
inline

Definition at line 44 of file protocolhttp.h.

Here is the caller graph for this function:

◆ connect()

void ProtocolHttp::connect ( const std::string &  host,
uint16  port 
)

Definition at line 39 of file protocolhttp.cpp.

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

◆ disconnect()

void ProtocolHttp::disconnect ( )

Definition at line 46 of file protocolhttp.cpp.

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

◆ onConnect()

void ProtocolHttp::onConnect ( )
protected

Definition at line 66 of file protocolhttp.cpp.

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

◆ onError()

void ProtocolHttp::onError ( const boost::system::error_code &  err)
protected

Definition at line 77 of file protocolhttp.cpp.

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

◆ onRecv()

void ProtocolHttp::onRecv ( uint8 buffer,
uint16  size 
)
protected

Definition at line 71 of file protocolhttp.cpp.

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

◆ recv()

void ProtocolHttp::recv ( )

Definition at line 60 of file protocolhttp.cpp.

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

◆ send()

void ProtocolHttp::send ( const std::string &  message)

Definition at line 54 of file protocolhttp.cpp.

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

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