From 7cd8c4142b83b3c4fe823421ba73b20df2a00516 Mon Sep 17 00:00:00 2001 From: adrian <> Date: Thu, 12 Sep 2002 15:43:51 +0000 Subject: [PATCH] Document the semantics of comm_write() - its not immediately obvious (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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/comm.cc b/src/comm.cc index 74337c1e55..72175de363 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -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) { -- 2.47.3