Search in sources :

Example 1 with CreateLeaseSetMessage

use of net.i2p.data.i2cp.CreateLeaseSetMessage in project i2p.i2p by i2p.

the class I2CPMessageProducer method createLeaseSet.

/**
 * Create a new signed leaseSet in response to a request to do so and send it
 * to the router
 */
public void createLeaseSet(I2PSessionImpl session, LeaseSet leaseSet, SigningPrivateKey signingPriv, PrivateKey priv) throws I2PSessionException {
    CreateLeaseSetMessage msg = new CreateLeaseSetMessage();
    msg.setLeaseSet(leaseSet);
    msg.setPrivateKey(priv);
    msg.setSigningPrivateKey(signingPriv);
    SessionId sid = session.getSessionId();
    if (sid == null) {
        _log.error(session.toString() + " create LS w/o session", new Exception());
        return;
    }
    msg.setSessionId(sid);
    session.sendMessage_unchecked(msg);
}
Also used : CreateLeaseSetMessage(net.i2p.data.i2cp.CreateLeaseSetMessage) SessionId(net.i2p.data.i2cp.SessionId) DataFormatException(net.i2p.data.DataFormatException) I2PSessionException(net.i2p.client.I2PSessionException)

Aggregations

I2PSessionException (net.i2p.client.I2PSessionException)1 DataFormatException (net.i2p.data.DataFormatException)1 CreateLeaseSetMessage (net.i2p.data.i2cp.CreateLeaseSetMessage)1 SessionId (net.i2p.data.i2cp.SessionId)1