update since bw limiter interface changed (but dont bother to use it anymore here)

i wonder if i should remove the phttp transport now or keep it around in case it gets revived...
This commit is contained in:
jrandom
2004-06-20 00:50:38 +00:00
committed by zzz
parent c9ee2a92a3
commit 4e5a2e012c
2 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ class PHTTPSender {
}
private boolean doSend(OutNetMessage msg) throws IOException {
long delay = _context.bandwidthLimiter().calculateDelayOutbound(msg.getTarget().getIdentity(), (int)msg.getMessageSize());
long delay = 0; // _context.bandwidthLimiter().calculateDelayOutbound(msg.getTarget().getIdentity(), (int)msg.getMessageSize());
_log.debug("Delaying [" + delay + "ms]");
try { Thread.sleep(delay); } catch (InterruptedException ie) {}
_log.debug("Continuing with sending");

View File

@ -240,7 +240,7 @@ public class PHTTPTransport extends TransportImpl {
if (_poller.shouldRejectMessages())
return null; // we're not using phttp
long latencyStartup = _context.bandwidthLimiter().calculateDelayOutbound(toAddress.getIdentity(), (int)dataSize);
long latencyStartup = 0; //_context.bandwidthLimiter().calculateDelayOutbound(toAddress.getIdentity(), (int)dataSize);
latencyStartup += _pollFrequencyMs / 2; // average distance until the next poll
long sendTime = (int)((dataSize)/(16*1024)); // 16K/sec ARBITRARY
int bytes = (int)dataSize+1024;
@ -288,7 +288,7 @@ public class PHTTPTransport extends TransportImpl {
}
public String getName() { return "Push New PHTTP Message"; }
public void runJob() {
long delay = _context.bandwidthLimiter().calculateDelayOutbound(_msg.getTarget().getIdentity(), (int)_msg.getMessageSize());
long delay = 0; // _context.bandwidthLimiter().calculateDelayOutbound(_msg.getTarget().getIdentity(), (int)_msg.getMessageSize());
if (delay > 0) {
getTiming().setStartAfter(delay + _context.clock().now());
PHTTPTransport.this._context.jobQueue().addJob(this);