Date: Tuesday, January 30, 2007 @ 10:55:07
  Author: gilles
    Path: /cvsroot/carob/carob/include

Modified: BufferedSocket.hpp (1.2 -> 1.3)

Javadoc enhancements


--------------------+
 BufferedSocket.hpp |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)


Index: carob/include/BufferedSocket.hpp
diff -u carob/include/BufferedSocket.hpp:1.2 
carob/include/BufferedSocket.hpp:1.3
--- carob/include/BufferedSocket.hpp:1.2        Mon Jan 29 17:54:38 2007
+++ carob/include/BufferedSocket.hpp    Tue Jan 30 10:55:07 2007
@@ -103,9 +103,12 @@
 protected:
   /**
    * Substitute for recv. Waits for incomming data by calling pollOnSingleFd
-   * and loops until full length has been received or an erro occured. If
+   * and loops until full length has been received or an error occured. If
    * shutdown() is called during the loop, throws a SocketIOException to inform
-   * callers that the socket is not longer readable
+   * callers that the socket is not longer readable. If there are output data 
to
+   * be sent in the write buffer, this function will flush these data. This
+   * prevents from doing a flush() everywhere in the code, but still can be
+   * overriden by calling manually #flush() (could be an optimization (?))
    * @param buf data to send
    * @param len full buffer length
    * @param flags send options, see recv man page
@@ -115,13 +118,16 @@
   int32_t             recvFully(void *buf, const int len, const int flags)
                           const throw (SocketIOException, UnexpectedException);
   /**
-   * Wrapper over send(...) function to handle errors and throw exceptions
+   * Wrapper over send(...) function to buffer output data and handle 
errors.<br>
+   * Data is only sent to the socket when the buffer is full or when a read
+   * operation is requested.
    * @param fctName name of the calling function (for logging purposes)
    * @param objName name of the object to be send (for logging purposes)
    * @param buf data to be send
    * @param len length of buf
    * @param flags send option, see recv man page
    * @throws SocketIOException
+   * @see #recvFully(void *, const int, const int) const
    */
   void                sendToSocket(const wchar_t fctName[],
                           const std::wstring& objName, const void* buf, int 
len,

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to