--------------------- PatchSet 6208 Date: 2007/11/29 20:49:25 Author: rousskov Branch: async-calls Tag: (none) Log: Added comm_read() that accepts AsyncCall. It is used by delayed reads now. Eventually, all CNCB-, IOCB-, and IOACB-accepting comm_ functions will be replaced by functions accepting AsyncCalls. Removed unused IOFCB, IOWCB, and CWCB. Members: src/comm.h:1.26->1.26.4.1 Index: squid3/src/comm.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/comm.h,v retrieving revision 1.26 retrieving revision 1.26.4.1 diff -u -r1.26 -r1.26.4.1 --- squid3/src/comm.h 25 Sep 2007 13:52:18 -0000 1.26 +++ squid3/src/comm.h 29 Nov 2007 20:49:25 -0000 1.26.4.1 @@ -22,14 +22,13 @@ COMM_ERR_DNS = -9, COMM_ERR_CLOSING = -10, } comm_err_t; -typedef void IOFCB(int fd, StoreIOBuffer receivedData, comm_err_t flag, int xerrno, void *data); -typedef void IOWCB(int fd, char *buffer, size_t len, comm_err_t flag, int xerrno, void *data); -typedef void CWCB(int fd, char *, size_t size, comm_err_t flag, void *data); typedef void CNCB(int fd, comm_err_t status, int xerrno, void *data); typedef void IOCB(int fd, char *, size_t size, comm_err_t flag, int xerrno, void *data); +class AsyncCall; + /* comm.c */ extern void comm_calliocallback(void); extern bool comm_iocallbackpending(void); /* inline candidate */ @@ -84,6 +83,7 @@ extern int comm_has_pending_read_callback(int fd); extern bool comm_has_pending_read(int fd); extern void comm_read(int fd, char *buf, int len, IOCB *handler, void *data); +extern void comm_read(int fd, char *buf, int len, AsyncCall *callback); extern void comm_read_cancel(int fd, IOCB *callback, void *data); extern void fdc_open(int fd, unsigned int type, char const *desc); extern int comm_udp_recvfrom(int fd, void *buf, size_t len, int flags,