CachedPacket

final class CachedPacket

Class CachedPacket. Provides cachedpacket functionality for the Hytale server.

java.lang.Object > CachedPacket

Field Summary

buf

final ByteBuf buf

Field buf.

Method Detail

CachedPacket

public private CachedPacket (final Class packetType, final int packetId, final ByteBuf cachedBytes)

Method CachedPacket.

Parameters:
final Class packetType
final int packetId
final ByteBuf cachedBytes

cache

static CachedPacket cache (@Nonnull final T packet)

Method cache.

Parameters:
@Nonnull final T packet

getId

public int getId ()

Method getId.

serialize

public void serialize (@Nonnull final ByteBuf buf)

Method serialize.

Parameters:
@Nonnull final ByteBuf buf

computeSize

public int computeSize ()

Method computeSize.

getPacketType

public Class getPacketType ()

Method getPacketType.

getCachedSize

public int getCachedSize ()

Method getCachedSize.

close

public void close ()

Method close.