Interface PacketHandler<P extends Packet,S extends EngineConnectionState>

Type Parameters:
S - The connection state
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,S extends EngineConnectionState>
Represents a handler for a packet that was received over the network.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(P packet, S state)
    Handles the Packet sent by a remote connection.
  • Method Details

    • handle

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