Interface PacketHandler<P extends Packet,​C extends EngineConnection>

  • Type Parameters:
    C - The connection type
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface PacketHandler<P extends Packet,​C extends EngineConnection>
    Represents a handler for a packet that was received over the network.
    • Method Detail

      • handle

        void handle​(P packet,
                    C connection)
        Handles the Packet sent by a remote connection.
        Parameters:
        packet - The packet received
        connection - The connection that sent the packet