use of i2p.bote.packet.MalformedCommunicationPacket in project i2p.i2p-bote by i2p.
the class I2PPacketDispatcher method dispatchPacket.
/**
* Creates a packet from a byte array and fires listeners.
* @param packetData
* @param sender
*/
private void dispatchPacket(byte[] packetData, Destination sender) {
CommunicationPacket packet;
try {
packet = CommunicationPacket.createPacket(packetData);
logPacket(packet, sender);
firePacketReceivedEvent(packet, sender);
} catch (MalformedPacketException e) {
log.warn("Ignoring unparseable packet.", e);
firePacketReceivedEvent(new MalformedCommunicationPacket(), sender);
}
}
Aggregations