X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fevent_client.h;h=0b71c743e02833f1ed4becc4812498ea88a8aed4;hb=5268c0a9bf8202336b9e3e8b86f45d9d010f2811;hp=ea68053d295bdd9cce9d9607f411824dfb344d6f;hpb=77e22b6bbcf9fa8c690ad3872f9a65d969d45335;p=citadel.git diff --git a/citadel/event_client.h b/citadel/event_client.h index ea68053d2..0b71c743e 100644 --- a/citadel/event_client.h +++ b/citadel/event_client.h @@ -78,6 +78,21 @@ typedef struct _evcurl_request_data long httpcode; } evcurl_request_data; +/* DNS Related */ +typedef struct __evcares_data { + ev_io recv_event, + send_event; + ev_timer timeout; /* timeout while requesting ips */ +#ifdef DEBUG_CARES + short int SourcePort; +#endif + struct ares_options Options; + ares_channel Channel; + DNSQueryParts *Query; + + IO_CallBack Fail; /* the dns lookup didn't work out. */ +} evcares_data; + struct AsyncIO { long ID; eNextState NextState; @@ -112,23 +127,13 @@ struct AsyncIO { Terminate, /* shutting down... */ Timeout, /* Timeout handler; may also be connection timeout */ ConnFail, /* What to do when one connection failed? */ - DNSFail, /* the dns lookup didn't work out. */ ShutdownAbort,/* we're going down. make your piece. */ NextDBOperation; /* Perform Database IO */ IO_LineReaderCallback LineReader; /* if we have linereaders, maybe we want to read more lines before the real application logic is called? */ - /* DNS Related */ - ev_io dns_recv_event, - dns_send_event; - ev_timer dns_timeout; /* timeout while requesting ips */ -#ifdef DEBUG_CARES - short int DnsSourcePort; -#endif - struct ares_options DNSOptions; - ares_channel DNSChannel; - DNSQueryParts *DNSQuery; - + evcares_data DNS; + evcurl_request_data HttpReq; /* Saving / loading a message async from / to disk */ @@ -159,7 +164,6 @@ eNextState NextDBOperation(AsyncIO *IO, IO_CallBack CB); eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB); eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB); eNextState QueueCurlContext(AsyncIO *IO); -int ShutDownEventQueue(void); eNextState InitEventIO(AsyncIO *IO, void *pData,