[Bamboo-Users] Code Snippet

Haijun Cao Haijun at projectrialto.com
Tue Dec 4 19:29:23 UTC 2007


I figure it is to simulate lossy network connection, and trigger udpcc
re-send logic via timeout.

Haijun

-----Original Message-----
From: bamboo-users-bounces at bamboo-dht.org
[mailto:bamboo-users-bounces at bamboo-dht.org] On Behalf Of
Martina.Baldanzi at isti.cnr.it
Sent: Tuesday, December 04, 2007 9:22 AM
To: bamboo-users at bamboo-dht.org
Cc: martina.baldanzi at isti.cnr.it
Subject: [Bamboo-Users] Code Snippet

Dear All,
I have a question about a code snippet in file bamboo.lss.Network.java.
It's not clear the meaning of the following do-while loop:

do {
        dp *= drop_prob;
        ts -= 5;
     }
while (ts > 0);

inside the

public Object send(final QuickSerializable msg, final InetSocketAddress
dst,
                       final long timeoutSeconds,
                       final Thunk1<Boolean> callback)  method.

I think that the loop calculates the probability to drop a message, but
I
don't understand the meaning. Any Ideas?

Thank you very much,
Martina
_______________________________________________
Bamboo-Users mailing list
Bamboo-Users at bamboo-dht.org
http://bamboo-dht.org/cgi-bin/mailman/listinfo/bamboo-users


More information about the Bamboo-Users mailing list