Package org.moddingx.libx.network
Interface PacketHandler<T>
public interface PacketHandler<T>
An interface implementing the logic on how to handle a type of packet.
Note that
PacketSerializer
and PacketHandler
may not be implemented on the same class.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Handles the given message.target()
The target thread, this handler should run on.
-
Method Details
-
target
PacketHandler.Target target()The target thread, this handler should run on. -
handle
Handles the given message.- Returns:
- Whether the message was handled. This is ignored on the
main thread
target.
-