class I2CPMessageProducer extends Object
Modifier and Type | Field and Description |
---|---|
(package private) static boolean |
END_TO_END_CRYPTO
Should we include the I2CP end to end crypto (which is in addition to any
garlic crypto added by the router)
|
Constructor and Description |
---|
I2CPMessageProducer(I2PAppContext context) |
Modifier and Type | Method and Description |
---|---|
void |
connect(I2PSessionImpl session)
Send all the messages that a client needs to send to a router to establish
a new session.
|
void |
createLeaseSet(I2PSessionImpl session,
LeaseSet leaseSet,
SigningPrivateKey signingPriv,
PrivateKey priv)
Create a new signed leaseSet in response to a request to do so and send it
to the router
|
void |
disconnect(I2PSessionImpl session)
Send messages to the router destroying the session and disconnecting
|
void |
reportAbuse(I2PSessionImpl session,
int msgId,
int severity)
Send an abuse message to the router
|
void |
sendMessage(I2PSessionImpl session,
Destination dest,
long nonce,
byte[] payload,
long expires,
int flags)
Package up and send the payload to the router for delivery
|
void |
sendMessage(I2PSessionImpl session,
Destination dest,
long nonce,
byte[] payload,
SendMessageOptions options)
Package up and send the payload to the router for delivery
|
void |
sendMessage(I2PSessionImpl session,
Destination dest,
long nonce,
byte[] payload,
SessionTag tag,
SessionKey key,
Set<SessionTag> tags,
SessionKey newKey,
long expires)
Package up and send the payload to the router for delivery
|
void |
updateBandwidth(I2PSessionImpl session)
Update the bandwidth setting
|
void |
updateTunnels(I2PSessionImpl session,
int tunnels)
Update number of tunnels
|
static final boolean END_TO_END_CRYPTO
public I2CPMessageProducer(I2PAppContext context)
public void updateBandwidth(I2PSessionImpl session)
public void connect(I2PSessionImpl session) throws I2PSessionException
I2PSessionException
public void disconnect(I2PSessionImpl session) throws I2PSessionException
I2PSessionException
public void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SessionTag tag, SessionKey key, Set<SessionTag> tags, SessionKey newKey, long expires) throws I2PSessionException
nonce
- 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessagetag
- unused - no end-to-end cryptotags
- unused - no end-to-end cryptokey
- unused - no end-to-end cryptonewKey
- unused - no end-to-end cryptoI2PSessionException
public void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, long expires, int flags) throws I2PSessionException
nonce
- 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessageI2PSessionException
public void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SendMessageOptions options) throws I2PSessionException
nonce
- 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessageI2PSessionException
public void reportAbuse(I2PSessionImpl session, int msgId, int severity) throws I2PSessionException
I2PSessionException
public void createLeaseSet(I2PSessionImpl session, LeaseSet leaseSet, SigningPrivateKey signingPriv, PrivateKey priv) throws I2PSessionException
I2PSessionException
public void updateTunnels(I2PSessionImpl session, int tunnels) throws I2PSessionException
tunnels
- 0 for original configured numberI2PSessionException