From 0693ac526df6a2f968e6a4ae3b03cda075cf1243 Mon Sep 17 00:00:00 2001 From: schmidt Date: Sat, 27 May 2000 20:09:31 +0000 Subject: ChangeLogTag:Sat May 27 14:59:08 2000 Douglas C. Schmidt --- ace/SOCK_Stream.h | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) (limited to 'ace/SOCK_Stream.h') diff --git a/ace/SOCK_Stream.h b/ace/SOCK_Stream.h index 6562ca36817..1852ed58e1b 100644 --- a/ace/SOCK_Stream.h +++ b/ace/SOCK_Stream.h @@ -36,23 +36,51 @@ class ACE_Export ACE_SOCK_Stream : public ACE_SOCK_IO // class. // // = NOTES + // is the buffer to write from or receive into. // - // The "_n" I/O methods keep looping until all the data has been - // transferred. These methods also work for sockets in + // is the number of bytes to transfer. + // + // The parameter in the following methods indicates + // how long to blocking trying to transfer data. If + // == 0, then the call behaves as a normal send/recv call, i.e., + // for blocking sockets, the call will block until action is + // possible; for non-blocking sockets, EWOULDBLOCK will be + // returned if no action is immediately possible. + // + // If != 0, the call will wait until the relative time + // specified in * elapses. + // + // Methods with parameter are I/O vector variants of the I/O + // operations. + // + // The "*_n()" I/O methods keep looping until all the data has + // been transferred. These methods also work for sockets in // non-blocking mode i.e., they keep looping on EWOULDBLOCK. // is used to make sure we keep making progress, i.e., // the same timeout value is used for every I/O operation in the - // loop and the timeout is not counted down. If the transfer - // times out, the number of bytes transferred so far are - // returned. + // loop and the timeout is not counted down. // - // Errors are reported by -1 and 0 return values. + // The return values for the "*_n()" methods losely match the + // return values from the non "_n" methods and are specified as + // follows: + // + // - On complete transfer, the number of bytes transferred is returned. + // - On timeout, -1 is returned, errno == ETIME. + // - On error, -1 is returned, errno is set to appropriate error. + // - On EOF, 0 is returned, errno is irrelevant. + // + // On partial transfers, i.e., if any data is transferred + // before timeout/error/EOF, will contain + // the number of bytes transferred. // - // Methods with the extra argument will always result in - // getting called. Methods without the extra - // argument will result in getting called on Win32 - // platforms, and getting called on non-Win32 platforms. + // Errors are reported by -1 and 0 return values. Check + // to find out what occurred. // + // Methods with the extra argument will always result + // in getting called. Methods without the extra + // argument will result in getting called on Win32 + // platforms, and getting called on non-Win32 + // platforms. public: // Initialization and termination methods. ACE_SOCK_Stream (void); -- cgit v1.2.1