Class PacketEncoder

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelOutboundHandlerAdapter
io.netty.handler.codec.MessageToByteEncoder<Packet>
com.hypixel.hytale.protocol.io.netty.PacketEncoder
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelOutboundHandler

@Sharable public class PacketEncoder extends io.netty.handler.codec.MessageToByteEncoder<Packet>
Netty encoder for the protocol. Handles length-prefixed framing. Wire format: [4-byte payload length] [4-byte packet ID] [payload]
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class io.netty.handler.codec.MessageToByteEncoder

    acceptOutboundMessage, write

    Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter

    bind, close, connect, deregister, disconnect, flush, read

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    exceptionCaught, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    exceptionCaught, handlerAdded, handlerRemoved
  • Constructor Details

    • PacketEncoder

      public PacketEncoder()