[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Flush the socket on each proxy transfer.



commit 1131da601b4bb03025d94bfaee06e2e2a2343bf0
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Sun Jul 10 01:30:35 2011 -0700

    Flush the socket on each proxy transfer.
    
    The documentation for the Socket class says, "Data written by the write
    methods is not immediately transmitted; it is queued until the flush()
    method is called." This appears not to be the case on Mac and GNU/Linux,
    but is the case on Windows.
---
 ProxyPair.as   |    1 +
 RTMFPSocket.as |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ProxyPair.as b/ProxyPair.as
index 62c6ec2..2b66532 100644
--- a/ProxyPair.as
+++ b/ProxyPair.as
@@ -127,6 +127,7 @@ package
             bytes = new ByteArray();
             s_from.readBytes(bytes, 0, n);
             s_to.writeBytes(bytes);
+            s_to.flush();
             ui.rate_limit.update(n);
             log(label + ": read " + bytes.length + ".");
         }
diff --git a/RTMFPSocket.as b/RTMFPSocket.as
index 49c297b..9dca232 100644
--- a/RTMFPSocket.as
+++ b/RTMFPSocket.as
@@ -205,5 +205,10 @@ package
             /* Use a short method name because it's sent over the wire. */
             outgoing.send("r", sendbuf);
         }
+
+        public function flush():void
+        {
+            /* Ignored. */
+        }
     }
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits