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.PumpedTunnelGateway
_isInbound, PROP_INITIAL_OB_QUEUE, PROP_MAX_IB_MSGS_PER_PUMP, PROP_MAX_IB_QUEUE, PROP_MAX_OB_MSGS_PER_PUMP
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
-
Constructor Details
-
ThrottledPumpedTunnelGateway
public ThrottledPumpedTunnelGateway(RouterContext context, TunnelGateway.QueuePreprocessor preprocessor, TunnelGateway.Sender sender, TunnelGateway.Receiver receiver, TunnelGatewayPumper pumper, HopConfig config)
-
-
Method Details
-
add
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)
-
toString
-