use of i2p.bote.packet.EmptyResponse in project i2p.i2p-bote by i2p.
the class I2PSendQueue method packetReceived.
// Implementation of PacketListener
@Override
public void packetReceived(CommunicationPacket packet, Destination sender, long receiveTime) {
if (packet instanceof ResponsePacket) {
UniqueId packetId = packet.getPacketId();
for (PacketBatch batch : runningBatches) if (batch.contains(packetId)) {
DataPacket payload = ((ResponsePacket) packet).getPayload();
if (payload != null)
batch.addResponse(sender, payload);
else
batch.addResponse(sender, new EmptyResponse());
}
}
}
Aggregations