java.lang.Object
net.i2p.router.tunnel.InboundSender
- All Implemented Interfaces:
TunnelGateway.Sender
Receive the preprocessed data for an inbound gateway, encrypt it, and forward it on to the first hop.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InboundGatewayProcessorThe processor whose queue this sender drains.Constructor Summary
ConstructorsConstructorDescriptionInboundSender(I2PAppContext ctx, HopConfig config) Binds the given context and hop config for the inbound gateway.Method Summary
All MethodsModifier and TypeMethodDescriptionlongsendPreprocessed(byte[] preprocessed, TunnelGateway.Receiver receiver) Encrypt the preprocessed data and forward it to the receiver for delivery.
Field Details
_processor
The processor whose queue this sender drains.
Constructor Details
InboundSender
Binds the given context and hop config for the inbound gateway.- Parameters:
ctx- application context, passed to the gateway processorconfig- hop configuration for the inbound tunnel
Method Details
sendPreprocessed
Encrypt the preprocessed data and forward it to the receiver for delivery.- Specified by:
sendPreprocessedin interfaceTunnelGateway.Sender- Parameters:
preprocessed- the preprocessed datareceiver- the gateway end that will accept the encrypted data- Returns:
- message ID it was sent in, or -1 if it was deferred