Package net.i2p.client.impl
Class I2CPMessageProducer
java.lang.Object
net.i2p.client.impl.I2CPMessageProducer
Produce the various messages the session needs to send to the router.
- Author:
- jrandom
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(I2PSessionImpl session) Send all the messages that a client needs to send to a router to establish a new session.voidcreateLeaseSet(I2PSessionImpl session, LeaseSet leaseSet, SigningPrivateKey signingPriv, List<PrivateKey> privs) In response to a RequestLeaseSet Message from the router, send a CreateLeaseset Message back to the router.voiddisconnect(I2PSessionImpl session) Send a message to the router destroying the session, which could be a subsession.voidreportAbuse(I2PSessionImpl session, int msgId, int severity) Send an abuse message to the routervoidsendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, long expires, int flags) Package up and send the payload to the router for deliveryvoidsendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SendMessageOptions options) Package up and send the payload to the router for deliveryvoidsendMessage(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 deliveryvoidupdateBandwidth(I2PSessionImpl session) Update the bandwidth settingvoidupdateTunnels(I2PSessionImpl session, int tunnels) Update number of tunnels
-
Constructor Details
-
I2CPMessageProducer
-
-
Method Details
-
updateBandwidth
Update the bandwidth setting- Since:
- 0.8.4
-
connect
Send all the messages that a client needs to send to a router to establish a new session.- Throws:
I2PSessionException
-
disconnect
Send a message to the router destroying the session, which could be a subsession. This does NOT close the socket.- Throws:
I2PSessionException
-
sendMessage
public void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SessionTag tag, SessionKey key, Set<SessionTag> tags, SessionKey newKey, long expires) throws I2PSessionException Package up and send the payload to the router for delivery- Parameters:
nonce- 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessagetag- unused - no end-to-end cryptokey- unused - no end-to-end cryptotags- unused - no end-to-end cryptonewKey- unused - no end-to-end crypto- Throws:
I2PSessionException
-
sendMessage
public void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, long expires, int flags) throws I2PSessionException Package up and send the payload to the router for delivery- Parameters:
nonce- 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessage- Throws:
I2PSessionException- Since:
- 0.8.4
-
sendMessage
public void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SendMessageOptions options) throws I2PSessionException Package up and send the payload to the router for delivery- Parameters:
nonce- 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessage- Throws:
I2PSessionException- Since:
- 0.9.2
-
reportAbuse
Send an abuse message to the router- Throws:
I2PSessionException
-
createLeaseSet
public void createLeaseSet(I2PSessionImpl session, LeaseSet leaseSet, SigningPrivateKey signingPriv, List<PrivateKey> privs) throws I2PSessionException In response to a RequestLeaseSet Message from the router, send a CreateLeaseset Message back to the router. This method is misnamed, it does not create the LeaseSet, the caller does that.- Parameters:
signingPriv- ignored for LS2- Throws:
I2PSessionException
-
updateTunnels
Update number of tunnels- Parameters:
tunnels- 0 for original configured number- Throws:
I2PSessionException
-