Ejemplo n.º 1
0
	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();
	}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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);
}
Ejemplo n.º 4
0
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);
}
Ejemplo n.º 5
0
	static void as_cb(struct ev_loop *loop, struct ev_async *watcher,
	                  int32_t revents)
	{
		doAsync();
	}