--------------------- PatchSet 1666 Date: 2001/02/25 22:15:24 Author: hno Branch: eventio Tag: (none) Log: * ncomm_close() is nowdays a "soft" operation, only signalling EOF. * ncomm_closed(), to query if a filehandle has been ncomm_close():d. * ncomm_write_mbuf Members: doc/Programming-Guide/prog-guide.sgml:1.9.8.9->1.9.8.10 Index: squid/doc/Programming-Guide/prog-guide.sgml =================================================================== RCS file: /cvsroot/squid-sf//squid/doc/Programming-Guide/prog-guide.sgml,v retrieving revision 1.9.8.9 retrieving revision 1.9.8.10 diff -u -r1.9.8.9 -r1.9.8.10 --- squid/doc/Programming-Guide/prog-guide.sgml 25 Feb 2001 12:22:05 -0000 1.9.8.9 +++ squid/doc/Programming-Guide/prog-guide.sgml 25 Feb 2001 22:15:24 -0000 1.9.8.10 @@ -2,7 +2,7 @@
Squid Programmers Guide Duane Wessels, Squid Developers -$Id: prog-guide.sgml,v 1.9.8.9 2001/02/25 12:22:05 hno Exp $ +$Id: prog-guide.sgml,v 1.9.8.10 2001/02/25 22:15:24 hno Exp $ Squid is a WWW Cache application developed by the National Laboratory @@ -3025,14 +3025,30 @@

- Closes down the socket once all pending data has been sent (and - acknowledged via callbacks) + Signals EOF on the socket. No further ncomm_write calls is allowed + after this.

- Any pending reads will be cancelled without any callback + Any pending I/O operations will be completed. + +

+ The socket will get fully closed when the last reference to the + filehandle is gone. + +ncomm_closed + +

+ int + ncomm_closed(filehandle *fh); + + +

+ Returns true if a filehandle has been closed with ncomm_close() ncomm_abort +

int ncomm_abort(filehandle *fh); @@ -3085,7 +3101,7 @@ ncomm_connect(int sock_type, int proto, const struct sockaddr *local, const struct sockaddr *remote, int addrsize, - COMMNEWCB *callback, void *data) + COMMNEWCB *callback, void *cbdata)

@@ -3102,7 +3118,7 @@

void ncomm_read(filehandle *fh, size_t max_size, COMMIOCB *callback, - void *data); + void *cbdata);

@@ -3121,7 +3137,7 @@

void ncomm_write(filehandle *fh, IOBUF *buf, COMMIOCB *callback, - void *data); + void *cbdata);

@@ -3142,13 +3158,28 @@

void ncomm_write_fragment(filehandle *fh, IOBUF *buf, off_t offset, - size_t size, COMMIOCB *callback, void *data); + size_t size, COMMIOCB *callback, void *cbdata);

as ncomm_write, but only writes the indicated range of the supplied IOBuf. +ncomm_write_mbuf + +

+ void + ncomm_write_mbuf(filehandle *fh, MemBuf mb, COMMIOCB *callback, + void *cbdata); + + +

+ Like comm_write, but gets the data from a MemBuf instead of a IOBuf. + +

+ The MemBuf should not be used after this. The responsibility for + the data area is taken over by ncomm. + ncomm_add_close_handler