Date: Tuesday, January 30, 2007 @ 12:03:27
  Author: marc
    Path: /cvsroot/carob/carob/src

Modified: BufferedSocket.cpp (1.2 -> 1.3)

More detailed explanation about write cache flush() inside receive code


--------------------+
 BufferedSocket.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


Index: carob/src/BufferedSocket.cpp
diff -u carob/src/BufferedSocket.cpp:1.2 carob/src/BufferedSocket.cpp:1.3
--- carob/src/BufferedSocket.cpp:1.2    Tue Jan 30 10:54:55 2007
+++ carob/src/BufferedSocket.cpp        Tue Jan 30 12:03:27 2007
@@ -42,8 +42,12 @@
     int availableBytes = read_cache.getDataSize();
     if (availableBytes < 1)
     {
-      // First send data that has been buffered
+      // Application has eaten everything we received so far in the
+      // read cache and it wants even more: perfect time to flush()
+      // the write cache, make the controller react and send us some
+      // new data.
       flush();
+
       availableBytes = fillReadBuffer(flags);
     }
     int toBeReadThisTime = remainingBytesToRead;

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

Reply via email to