enet::HttpClient Class Reference
Inheritance diagram for enet::HttpClient:
enet::Http

Public Member Functions

 HttpClient (enet::Tcp _connection)
 
void setHeader (const enet::HttpRequest &_header)
 
template<class CLASS_TYPE >
void connectHeader (CLASS_TYPE *_class, void(CLASS_TYPE::*_func)(const enet::HttpAnswer &))
 
void connectHeader (Http::ObserverAnswer _func)
 
- Public Member Functions inherited from enet::Http
 Http (enet::Tcp _connection, bool _isServer=false)
 
bool getServerState ()
 
bool isServer ()
 
const enet::HttpRequestgetRequestHeader ()
 
const enet::HttpAnswergetAnswerHeader ()
 
void start ()
 
void stop (bool _inThread=false)
 
bool isAlive () const
 
template<class CLASS_TYPE >
void connect (CLASS_TYPE *_class, void(CLASS_TYPE::*_func)(std::vector< uint8_t > &))
 
void connect (Observer _func)
 
template<class CLASS_TYPE >
void connectRaw (CLASS_TYPE *_class, void(CLASS_TYPE::*_func)(enet::Tcp &))
 
void connectRaw (ObserverRaw _func)
 
int32_t write (const void *_data, int32_t _len)
 
int32_t write (const std::string &_data, bool _writeBackSlashZero=true)
 
template<class T >
int32_t write (const std::vector< T > &_data)
 

Additional Inherited Members

- Public Types inherited from enet::Http
using Observer = std::function< void(std::vector< uint8_t > &)>
 
using ObserverRaw = std::function< void(enet::Tcp &)>
 
using ObserverRequest = std::function< void(const enet::HttpRequest &)>
 
using ObserverAnswer = std::function< void(const enet::HttpAnswer &)>
 
- Public Attributes inherited from enet::Http
Observer m_observer
 
ObserverRaw m_observerRaw
 
- Protected Member Functions inherited from enet::Http
void setRequestHeader (const enet::HttpRequest &_req)
 
void setAnswerHeader (const enet::HttpAnswer &_req)
 
- Protected Attributes inherited from enet::Http
enet::HttpRequest m_requestHeader
 
enet::HttpAnswer m_answerHeader
 
enet::Tcp m_connection
 
bool m_headerIsSend
 
std::thread * m_thread
 
bool m_threadRunning
 
std::vector< uint8_t > m_temporaryBuffer
 
ObserverRequest m_observerRequest
 
ObserverAnswer m_observerAnswer
 

Member Function Documentation

§ connectHeader()

template<class CLASS_TYPE >
void enet::HttpClient::connectHeader ( CLASS_TYPE *  _class,
void(CLASS_TYPE::*)(const enet::HttpAnswer &)  _func 
)
inline

Connect an function member on the signal with the shared_ptr object.

Parameters
[in]_classshared_ptr Object on whe we need to call ==> the object is get in keeped in weak_ptr.
[in]_funcFunction to call.
[in]_argsArgument optinnal the user want to add.

The documentation for this class was generated from the following file:
  • framework/atria-soft/enet/enet/Http.hpp