| Modifier and Type | Class and Description |
|---|---|
protected class | I2PSource.ListenerListener for incoming I2P datagrams, dispatching to the configured sink. |
static class | I2PSource.ProtocolProtocol enum for I2P source handling. |
| Modifier and Type | Field and Description |
|---|---|
protected I2PSession | sessThe I2P session |
protected Sink | sinkThe sink to receive datagrams |
| Constructor and Description |
|---|
I2PSource(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. |
| Modifier and Type | Method and Description |
|---|---|
void | setSink(Sink sink)Sets the sink for received I2P datagrams. |
void | start()Starts the source to begin receiving datagrams. |
protected final I2PSession sess
protected Sink sink
public I2PSource(I2PSession sess)
sess - the I2P session to listen onpublic I2PSource(I2PSession sess, I2PSource.Protocol protocol)
sess - the I2P session to listen onprotocol - REPLIABLE, RAW, or BOTHpublic I2PSource(I2PSession sess, I2PSource.Protocol protocol, int port)
sess - the I2P session to listen onprotocol - REPLIABLE, RAW, or BOTHport - I2CP port, or I2PSession.PORT_ANY for all ports