Interface IPacketListener


  • public interface IPacketListener
    An packet listeners, allows to handle incoming packets, from some channel, that use the IPacketListenerRegistry in that the listener has to be register

    It will called on all channels, that the registry has register the listener

    See Also:
    IPacketListenerRegistry
    • Method Detail

      • handle

        void handle​(INetworkChannel channel,
                    IPacket packet)
             throws java.lang.Exception
        Handles a new incoming packet message. The channel and the packet will not null
        Parameters:
        channel - the channel, from that the message was received
        packet - the received packet message, which should handle from the listener
        Throws:
        java.lang.Exception - catch the exception, if the handle throws one