eap.freeciv
Interface PacketListener
- All Known Implementing Classes:
- Client, PacketDumper, Player, Server
- public interface PacketListener
An interface for objects which can receive packets from a
PacketConnection
.
receivePacket
public void receivePacket(Packet packet)
- A
PacketConnection
calls this method for every registered listener every
time it reads a packet from its underlying socket.
Listeners should not modify the packet unless they can be sure noone else
is listening. This is because a PacketConnection does not guarantee the
order in which it passes packets to its registered listeners.