Author: mrogers
Date: 2006-11-01 17:13:09 +0000 (Wed, 01 Nov 2006)
New Revision: 10776

Modified:
   trunk/apps/load-balancing-sims/phase7/sim/Peer.java
Log:
Refactored interleaving, coalescing, congestion control and bandwidth limiter

Modified: trunk/apps/load-balancing-sims/phase7/sim/Peer.java
===================================================================
--- trunk/apps/load-balancing-sims/phase7/sim/Peer.java 2006-11-01 17:11:27 UTC 
(rev 10775)
+++ trunk/apps/load-balancing-sims/phase7/sim/Peer.java 2006-11-01 17:13:09 UTC 
(rev 10776)
@@ -128,7 +128,7 @@
                // Don't send empty packets
                if (p.acks == null && p.messages == null) return false;
                // Transmit the packet
-               log ("sending packet " + p.seq + ", " + p.size + " bytes");
+               log ("sending " + p + ", " + p.size + " bytes");
                node.net.send (p, address, latency);
                node.bandwidth.remove (p.size);
                // If the packet contains data, buffer it for retransmission
@@ -230,7 +230,7 @@
                        double age = now - p.sent;
                        // Explicit ack
                        if (p.seq == seq) {
-                               log ("packet " + p.seq + " acknowledged");
+                               log (p + " acknowledged");
                                i.remove();
                                // Update the congestion window
                                window.bytesAcked (p.size);
@@ -243,7 +243,7 @@
                        // Fast retransmission
                        if (p.seq < seq && age > FRTO * rtt + MAX_DELAY) {
                                p.sent = now;
-                               log ("fast retransmitting packet " + p.seq);
+                               log ("fast retransmitting " + p);
                                node.net.send (p, address, latency);
                                window.fastRetransmission (now);
                        }
@@ -274,7 +274,7 @@
                for (Packet p : txBuffer) {
                        if (now - p.sent > RTO * rtt + MAX_DELAY) {
                                // Retransmission timeout
-                               log ("retransmitting packet " + p.seq);
+                               log ("retransmitting " + p);
                                p.sent = now;
                                node.net.send (p, address, latency);
                                window.timeout (now);


Reply via email to