use of net.i2p.data.i2cp.DestReplyMessage in project i2p.i2p by i2p.
the class LocalClientMessageEventListener method handleDestLookup.
/**
* Look only in current local dests
*/
@Override
protected void handleDestLookup(DestLookupMessage message) {
Hash h = message.getHash();
DestReplyMessage msg;
Destination d = ((LocalClientConnectionRunner) _runner).localLookup(h);
if (d != null)
msg = new DestReplyMessage(d);
else
msg = new DestReplyMessage(h);
try {
_runner.doSend(msg);
} catch (I2CPMessageException ime) {
ime.printStackTrace();
}
}
use of net.i2p.data.i2cp.DestReplyMessage in project i2p.i2p by i2p.
the class DestReplyMessageHandler method handleMessage.
public void handleMessage(I2CPMessage message, I2PSessionImpl session) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Handle message " + message);
DestReplyMessage msg = (DestReplyMessage) message;
Destination d = msg.getDestination();
if (d != null) {
session.destReceived(d);
} else {
Hash h = msg.getHash();
if (h != null)
session.destLookupFailed(h);
}
// else let it time out
}
Aggregations