typedef enum _eNextState {
eSendDNSQuery,
eReadDNSReply,
+
eDBQuery,
+
eConnect,
eSendReply,
eSendMore,
+ eSendFile,
+
eReadMessage,
eReadMore,
eReadPayload,
+ eReadFile,
+
eTerminateConnection,
eAbort
}eNextState;
IOBuffer SendBuf,
RecvBuf;
+ FDIOBuffer IOB; /* when sending from / reading into files, this is used. */
+
/* our events... */
ev_cleanup abort_by_shutdown, /* server wants to go down... */
db_abort_by_shutdown; /* server wants to go down... */
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 */
void FreeAsyncIOContents(AsyncIO *IO);
eNextState NextDBOperation(AsyncIO *IO, IO_CallBack CB);
-int QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
-int QueueEventContext(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,
do { \
sta = curl_easy_setopt(chnd, (CURLOPT_##s), (v)); \
if (sta) { \
- CtdlLogPrintf(CTDL_ERR, "error setting option " #s " on curl handle: %s", curl_easy_strerror(sta)); \
+ syslog(LOG_ERR, "error setting option " #s " on curl handle: %s", curl_easy_strerror(sta)); \
} } while (0)
void *pData,
int ReadFirst);
-void evcurl_handle_start(AsyncIO *IO);
-
#endif /* __EVENT_CLIENT_H__ */