X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fevent_client.h;h=7fe12d1a4c9d40971c6e8e5e75e82d9b4dff4d44;hb=c12b418a64b44be9d08cae0e5dd25c988a522b90;hp=208a716616a7122ca8340490d2fa2511ffcc9d15;hpb=26ade12163f58929a68aa5acc2530c937185d665;p=citadel.git diff --git a/citadel/event_client.h b/citadel/event_client.h index 208a71661..7fe12d1a4 100644 --- a/citadel/event_client.h +++ b/citadel/event_client.h @@ -15,7 +15,6 @@ typedef enum _eNextState { eAbort }eNextState; -typedef int (*EventContextAttach)(void *Data); typedef eNextState (*IO_CallBack)(AsyncIO *IO); typedef eReadState (*IO_LineReaderCallback)(AsyncIO *IO); typedef void (*ParseDNSAnswerCb)(AsyncIO*, unsigned char*, int); @@ -32,6 +31,8 @@ struct AsyncIO { /* connection related */ int IP6; struct hostent *HEnt; + struct sockaddr_in6 Addr; + int sock; unsigned short dport; eNextState NextState; @@ -77,23 +78,17 @@ struct AsyncIO { }; typedef struct _IOAddHandler { - void *Ctx; - EventContextAttach EvAttch; + AsyncIO *IO; + IO_CallBack EvAttch; }IOAddHandler; void FreeAsyncIOContents(AsyncIO *IO); -int QueueEventContext(void *Ctx, AsyncIO *IO, EventContextAttach CB); +int QueueEventContext(AsyncIO *IO, IO_CallBack CB); int ShutDownEventQueue(void); void InitEventIO(AsyncIO *IO, void *pData, - IO_CallBack ReadDone, - IO_CallBack SendDone, - IO_CallBack Terminate, - IO_CallBack Timeout, - IO_CallBack ConnFail, - IO_LineReaderCallback LineReader, double conn_timeout, double first_rw_timeout, int ReadFirst);