Interface MessageFunctions.MessageDecoder<MSG>

Type Parameters:
MSG - the type of the message that is decoded
Enclosing class:
MessageFunctions
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 static interface MessageFunctions.MessageDecoder<MSG>
Functional interface used to decode messages from a byte buffer.
  • Method Summary

    Modifier and Type
    Method
    Description
    Decodes the message from the buffer.
  • Method Details

    • decode

      MSG decode(FriendlyByteBuf buffer)
      Decodes the message from the buffer.
      This method is called on the network thread, when the packet is received. Do not handle the message in this method.
      Returns:
      a decoded message