Package net.i2p.router.tunnel
Class ThrottledPumpedTunnelGateway
- java.lang.Object
-
- net.i2p.router.tunnel.TunnelGateway
-
- net.i2p.router.tunnel.PumpedTunnelGateway
-
- net.i2p.router.tunnel.ThrottledPumpedTunnelGateway
-
class ThrottledPumpedTunnelGateway extends PumpedTunnelGateway
Same as PTG, but check to see if a message should be dropped before queueing it. Used for IBGWs.- Since:
- 0.7.9
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.i2p.router.tunnel.TunnelGateway
TunnelGateway.DelayedFlush, TunnelGateway.QueuePreprocessor, TunnelGateway.Receiver, TunnelGateway.Sender
-
-
Field Summary
-
Fields inherited from class net.i2p.router.tunnel.TunnelGateway
_context, _delayedFlush, _lastFlush, _log, _messagesSent, _preprocessor, _queue, _receiver, _sender
-
-
Constructor Summary
Constructors Constructor Description ThrottledPumpedTunnelGateway(RouterContext context, TunnelGateway.QueuePreprocessor preprocessor, TunnelGateway.Sender sender, TunnelGateway.Receiver receiver, TunnelGatewayPumper pumper, HopConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(I2NPMessage msg, Hash toRouter, TunnelId toTunnel)
Possibly drop a message due to bandwidth before adding it to the preprocessor queue.String
toString()
-
Methods inherited from class net.i2p.router.tunnel.PumpedTunnelGateway
add, pump
-
Methods inherited from class net.i2p.router.tunnel.TunnelGateway
add, getMessagesSent
-
-
-
-
Constructor Detail
-
ThrottledPumpedTunnelGateway
public ThrottledPumpedTunnelGateway(RouterContext context, TunnelGateway.QueuePreprocessor preprocessor, TunnelGateway.Sender sender, TunnelGateway.Receiver receiver, TunnelGatewayPumper pumper, HopConfig config)
-
-
Method Detail
-
add
public void add(I2NPMessage msg, Hash toRouter, TunnelId toTunnel)
Possibly drop a message due to bandwidth before adding it to the preprocessor queue. We do this here instead of in the InboundGatewayReceiver because it is much smarter to drop whole I2NP messages, where we know the message type and length, rather than tunnel messages containing I2NP fragments.- Overrides:
add
in classPumpedTunnelGateway
- Parameters:
msg
- message to be sent through the tunneltoRouter
- router to send to after the endpoint (or null for endpoint processing)toTunnel
- tunnel to send to after the endpoint (or null for endpoint or router processing)
-
-