| 395 | } |
| 396 | |
| 397 | CAHttpClient::CAHttpClient(int thread) |
| 398 | : _timeoutForConnect(30) |
| 399 | , _timeoutForRead(60) |
| 400 | , _threadID(thread) |
| 401 | , _asyncRequestCount(0) |
| 402 | , need_quit(0) |
| 403 | , s_networkThread(pthread_t()) |
| 404 | , s_requestQueueMutex(pthread_mutex_t()) |
| 405 | , s_responseQueueMutex(pthread_mutex_t()) |
| 406 | , s_SleepMutex(pthread_mutex_t()) |
| 407 | , s_SleepCondition(pthread_cond_t()) |
| 408 | { |
| 409 | CAScheduler::schedule(schedule_selector(CAHttpClient::dispatchResponseCallbacks), this, 0); |
| 410 | CAScheduler::getScheduler()->pauseTarget(this); |
| 411 | lazyInitThreadSemphore(); |
| 412 | |
| 413 | ++s_httpClientCount; |
| 414 | } |
| 415 | |
| 416 | CAHttpClient::~CAHttpClient() |
| 417 | { |
nothing calls this directly
no test coverage detected