P
- The type of Packet
@FunctionalInterface public interface PacketEncoder<P extends Packet>
Packet
instances it's ByteBuf
representation.Modifier and Type | Method and Description |
---|---|
io.netty.buffer.ByteBuf |
encode(P packet)
Encodes a
Packet into a ByteBuf |
io.netty.buffer.ByteBuf encode(P packet) throws PacketEncodeException
Packet
into a ByteBuf
packet
- The Packet
to be encodedByteBuf
PacketEncodeException
- When an error occurs during the encoding processCopyright © 2016–2024. All rights reserved.