use of net.i2p.data.i2cp.ReceiveMessageEndMessage in project i2p.i2p by i2p.
the class MessagePayloadMessageHandler method handleMessage.
public void handleMessage(I2CPMessage message, I2PSessionImpl session) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Handle message " + message + " for session " + session);
try {
MessagePayloadMessage msg = (MessagePayloadMessage) message;
long id = msg.getMessageId();
decryptPayload(msg, session);
session.addNewMessage(msg);
// (needs router version saving support in SetDateMessageHandler)
if (!session.getFastReceive()) {
ReceiveMessageEndMessage m = new ReceiveMessageEndMessage();
m.setMessageId(id);
m.setSessionId(msg.getSessionId());
session.sendMessage(m);
}
} catch (DataFormatException dfe) {
session.propogateError("Error handling a new payload message", dfe);
} catch (I2PSessionException ise) {
session.propogateError("Error handling a new payload message", ise);
}
}
Aggregations