java.lang.Object
net.i2p.router.tunnel.OutboundSender
- All Implemented Interfaces:
TunnelGateway.Sender
Receive the preprocessed data for an outbound gateway, encrypt all of the layers, and forward it on to the first hop.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TunnelCreatorConfigThe tunnel this sender sends on.private final OutboundGatewayProcessorThe gateway processor feeding this sender.Constructor Summary
ConstructorsConstructorDescriptionOutboundSender(I2PAppContext ctx, TunnelCreatorConfig config) Binds the given context and config, creating the outbound gateway processor.Method Summary
All MethodsModifier and TypeMethodDescriptionlongsendPreprocessed(byte[] preprocessed, TunnelGateway.Receiver receiver) Encrypt and forward preprocessed data to the receiver.
Field Details
_config
The tunnel this sender sends on._processor
The gateway processor feeding this sender.
Constructor Details
OutboundSender
Binds the given context and config, creating the outbound gateway processor.- Parameters:
ctx- the application context, handed to the outbound gateway processorconfig- the tunnel creator config
Method Details
sendPreprocessed
Description copied from interface:TunnelGateway.SenderEncrypt and forward preprocessed data to the receiver.- 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