]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Document the semantics of comm_write() - its not immediately obvious
authoradrian <>
Thu, 12 Sep 2002 15:43:51 +0000 (15:43 +0000)
committeradrian <>
Thu, 12 Sep 2002 15:43:51 +0000 (15:43 +0000)
(well, without reading the rest of comm.c) that the handler is called
with COMM_ERROR_CLOSING whenever a comm filedescriptor is being closed
during a write.

src/comm.cc

index 74337c1e552b12225558e9316becd4fa2e8e9b89..72175de36328862559d328db1ce44de9752aeaad 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.331 2002/04/19 06:26:26 hno Exp $
+ * $Id: comm.cc,v 1.332 2002/09/12 09:43:51 adrian Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -908,8 +908,12 @@ commHandleWrite(int fd, void *data)
 
 
 
-/* Select for Writing on FD, until SIZE bytes are sent.  Call
- * *HANDLER when complete. */
+/*
+ * Queue a write. handler/handler_data are called when the write
+ * completes, on error, or on file descriptor close.
+ *
+ * free_func is used to free the passed buffer when the write has completed.
+ */
 void
 comm_write(int fd, const char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func)
 {