java.lang.Object
net.i2p.i2ptunnel.udp.I2PSource
- All Implemented Interfaces:
Source
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classListener for incoming I2P datagrams, dispatching to the configured sink.static enumProtocol enum for I2P source handling.Field Summary
FieldsModifier and TypeFieldDescriptionprivate final I2PDatagramDissectorDatagram dissector for parsing I2P UDP frames.private final LogLogger for this tunnel's datagram traffic.private final intLocal UDP port.private final I2PSource.ProtocolUDP protocol (unencrypted or encrypted).protected final I2PSessionThe I2P session.protected SinkThe sink to receive datagrams.Constructor Summary
ConstructorsConstructorDescriptionI2PSource(I2PSession sess) Creates a source handling both repliable and raw datagrams on all ports.I2PSource(I2PSession sess, I2PSource.Protocol protocol) Creates a source listening on all I2CP ports for the specified protocol.I2PSource(I2PSession sess, I2PSource.Protocol protocol, int port) Creates a source listening on the specified port for the specified protocol.Method Summary
All Methods
Field Details
sess
The I2P session.sink
The sink to receive datagrams.protocol
UDP protocol (unencrypted or encrypted).port
private final int portLocal UDP port.diss
Datagram dissector for parsing I2P UDP frames.log
Logger for this tunnel's datagram traffic.
Constructor Details
I2PSource
Creates a source handling both repliable and raw datagrams on all ports.- Parameters:
sess- the I2P session to listen on
I2PSource
Creates a source listening on all I2CP ports for the specified protocol.- Parameters:
sess- the I2P session to listen onprotocol- REPLIABLE, RAW, or BOTH
I2PSource
Creates a source listening on the specified port for the specified protocol.- Parameters:
sess- the I2P session to listen onprotocol- REPLIABLE, RAW, or BOTHport- I2CP port, orI2PSession.PORT_ANYfor all ports
Method Details
setSink
start