Singleton that handles asynchrounous http requests Once the request completed, a callback will issued in main thread when it provided during make request. More...
#include <HttpClient.h>
Public Member Functions | |
void | send (CCHttpRequest *request) |
Add a get request to task queue. More... | |
void | setTimeoutForConnect (int value) |
Change the connect timeout. More... | |
int | getTimeoutForConnect () |
Get connect timeout. More... | |
void | setTimeoutForRead (int value) |
Change the download timeout. More... | |
int | getTimeoutForRead () |
Get download timeout. More... | |
Public Member Functions inherited from CCObject | |
CCObject (void) | |
virtual | ~CCObject (void) |
void | release (void) |
void | retain (void) |
CCObject * | autorelease (void) |
CCObject * | copy (void) |
bool | isSingleReference (void) const |
unsigned int | retainCount (void) const |
virtual bool | isEqual (const CCObject *pObject) |
virtual void | acceptVisitor (CCDataVisitor &visitor) |
virtual void | update (float dt) |
Public Member Functions inherited from CCCopying | |
virtual CCObject * | copyWithZone (CCZone *pZone) |
Static Public Member Functions | |
static CCHttpClient * | getInstance () |
static void | destroyInstance () |
Relase the shared instance. More... | |
Additional Inherited Members | |
Public Attributes inherited from CCObject | |
unsigned int | m_uID |
int | m_nLuaID |
Protected Attributes inherited from CCObject | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
Singleton that handles asynchrounous http requests Once the request completed, a callback will issued in main thread when it provided during make request.
|
static |
Relase the shared instance.
|
static |
|
inline |
Get connect timeout.
|
inline |
Get download timeout.
void send | ( | CCHttpRequest * | request) |
Add a get request to task queue.
request | a CCHttpRequest object, which includes url, response callback etc. please make sure request->_requestData is clear before calling "send" here. |
|
inline |
Change the connect timeout.
timeout |
|
inline |
Change the download timeout.
value |