static void tm_cb(struct ev_loop *loop, struct ev_timer *watcher, int32_t revents) { ev_timer_init(watcher, tm_cb, 10, 0); ev_timer_start(s_loop, watcher); doAsync(); }
bool MPQPacker::packWithConfig(const char* path,const char* config,const char* mpq) { if ( isBusy() ) { return false; } reset(); doAsync(new MPQPackerAsync(this,path,mpq,config)); m_bFree = false; return true; }
void HippoHTTP::doGet(WCHAR *url, bool useCache, HippoHTTPAsyncHandler *handler) { HippoBSTR host; INTERNET_PORT port; HippoBSTR target; if (!parseURL(url, &host, &port, &target)) return; doAsync(host, port, L"GET", target, useCache, NULL, NULL, 0, handler); }
void HippoHTTP::doPost(WCHAR *url, WCHAR *contentType, void *requestInput, long len, HippoHTTPAsyncHandler *handler) { HippoBSTR host; INTERNET_PORT port; HippoBSTR target; if (!parseURL(url, &host, &port, &target)) return; doAsync(host, port, L"POST", target, false, contentType, requestInput, len, handler); }
static void as_cb(struct ev_loop *loop, struct ev_async *watcher, int32_t revents) { doAsync(); }