* Streaming, I2CP, Client Message sending:

Pass message timeout through new I2CP message
       SendMessageExpiresMessage, so that the router
       uses the same expiration as the streaming lib.
       Should help reliability.
     * I2CP:
       Implement new I2CP message ReconfigureSessionMessage.
       Will be used for tunnel reduction.
This commit is contained in:
zzz
2009-01-20 17:22:56 +00:00
parent ab92206b77
commit 6be54942ec
14 changed files with 343 additions and 39 deletions

View File

@@ -82,7 +82,16 @@ class PacketQueue {
// this should not block!
begin = _context.clock().now();
sent = _session.sendMessage(packet.getTo(), buf, 0, size, keyUsed, tagsSent);
long expires = 0;
Connection.ResendPacketEvent rpe = (Connection.ResendPacketEvent) packet.getResendEvent();
if (rpe != null)
// we want the router to expire it a little before we do,
// so if we retransmit it will use a new tunnel/lease combo
expires = rpe.getNextSendTime() - 500;
if (expires > 0)
sent = _session.sendMessage(packet.getTo(), buf, 0, size, keyUsed, tagsSent, expires);
else
sent = _session.sendMessage(packet.getTo(), buf, 0, size, keyUsed, tagsSent);
end = _context.clock().now();
if ( (end-begin > 1000) && (_log.shouldLog(Log.WARN)) )