X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fevent_client.h;h=2d5ab986161d1a7a85de628b766d2dec5f2fec29;hb=b1493ab199a2cf39b919cb8d0536263ae1d280aa;hp=66f7f42e1782d0deb42594e8f9687d3db73e7594;hpb=51df62c4732353701b6e7ef05ba586be054fa92d;p=citadel.git diff --git a/citadel/event_client.h b/citadel/event_client.h index 66f7f42e1..2d5ab9861 100644 --- a/citadel/event_client.h +++ b/citadel/event_client.h @@ -100,6 +100,7 @@ typedef struct _evcurl_request_data /* DNS Related */ typedef struct __evcares_data { + ev_tstamp Start; ev_io recv_event, send_event; ev_timer timeout; /* timeout while requesting ips */ @@ -115,6 +116,9 @@ typedef struct __evcares_data { struct AsyncIO { long ID; + ev_tstamp Now; + ev_tstamp StartIO; + ev_tstamp StartDB; eNextState NextState; /* connection related */ @@ -146,6 +150,7 @@ struct AsyncIO { IO_CallBack ReadDone, /* Theres new data to read... */ SendDone, /* we may send more data */ Terminate, /* shutting down... */ + DBTerminate, /* shutting down... */ Timeout, /* Timeout handler;may also be conn. timeout */ ConnFail, /* What to do when one connection failed? */ ShutdownAbort,/* we're going down. make your piece. */ @@ -252,8 +257,6 @@ void StopClientWatchers(AsyncIO *IO); void SetNextTimeout(AsyncIO *IO, double timeout); -void InitC_ares_dns(AsyncIO *IO); - #include #define OPT(s, v) \ @@ -274,6 +277,7 @@ void InitIOStruct(AsyncIO *IO, IO_CallBack SendDone, IO_CallBack ReadDone, IO_CallBack Terminate, + IO_CallBack DBTerminate, IO_CallBack ConnFail, IO_CallBack Timeout, IO_CallBack ShutdownAbort); @@ -283,6 +287,7 @@ int InitcURLIOStruct(AsyncIO *IO, const char* Desc, IO_CallBack SendDone, IO_CallBack Terminate, + IO_CallBack DBTerminate, IO_CallBack ShutdownAbort); eNextState ReAttachIO(AsyncIO *IO, @@ -290,5 +295,6 @@ eNextState ReAttachIO(AsyncIO *IO, int ReadFirst); void EV_backtrace(AsyncIO *IO); +ev_tstamp ctdl_ev_now (void); #endif /* __EVENT_CLIENT_H__ */