IO_CallBack Fail; /* the dns lookup didn't work out. */
} evcares_data;
+
struct AsyncIO {
long ID;
ev_tstamp Now;
Timeout, /* Timeout handler;may also be conn. timeout */
ConnFail, /* What to do when one connection failed? */
ShutdownAbort,/* we're going down. make your piece. */
- NextDBOperation; /* Perform Database IO */
+ NextDBOperation, /* Perform Database IO */
+ ReAttachCB; /* on the hop from one Q to the other, this is the next CB */
/* if we have linereaders, maybe we want to read more lines before
* the real application logic is called? */
} IOAddHandler;
+inline static time_t EvGetNow(AsyncIO *IO) { return (time_t) IO->Now;}
extern int DebugEventLoop;
extern int DebugCAres;
void FreeAsyncIOContents(AsyncIO *IO);
eNextState NextDBOperation(AsyncIO *IO, IO_CallBack CB);
-eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
eNextState EventQueueDBOperation(AsyncIO *IO, IO_CallBack CB, int CloseFDs);
void StopDBWatchers(AsyncIO *IO);
eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB);
curl_easy_strerror(sta)); \
} } while (0)
+#define SET_EV_TIME(IO, BASE) \
+ IO->Now = ev_now(BASE); \
+ if (IO->CitContext != NULL) IO->CitContext->lastcmd = IO->Now;
+
void InitIOStruct(AsyncIO *IO,
void *Data,
eNextState NextState,