net.i2p.router.tunnel
Class ThrottledPumpedTunnelGateway
java.lang.Object
net.i2p.router.tunnel.TunnelGateway
net.i2p.router.tunnel.PumpedTunnelGateway
net.i2p.router.tunnel.ThrottledPumpedTunnelGateway
public 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
Method Summary |
void |
add(I2NPMessage msg,
Hash toRouter,
TunnelId toTunnel)
Possibly drop a message due to bandwidth before adding it to the preprocessor queue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThrottledPumpedTunnelGateway
public ThrottledPumpedTunnelGateway(RouterContext context,
TunnelGateway.QueuePreprocessor preprocessor,
TunnelGateway.Sender sender,
TunnelGateway.Receiver receiver,
TunnelGatewayPumper pumper,
HopConfig config)
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 class PumpedTunnelGateway
- 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)