Class ConfigureIcePeer

java.lang.Object
com.hypixel.hytale.protocol.packets.serveraccess.ConfigureIcePeer
All Implemented Interfaces:
Packet, ToServerPacket

public class ConfigureIcePeer extends Object implements Packet, ToServerPacket
  • Field Details

    • PACKET_ID

      public static final int PACKET_ID
      See Also:
    • IS_COMPRESSED

      public static final boolean IS_COMPRESSED
      See Also:
    • NULLABLE_BIT_FIELD_SIZE

      public static final int NULLABLE_BIT_FIELD_SIZE
      See Also:
    • FIXED_BLOCK_SIZE

      public static final int FIXED_BLOCK_SIZE
      See Also:
    • VARIABLE_FIELD_COUNT

      public static final int VARIABLE_FIELD_COUNT
      See Also:
    • VARIABLE_BLOCK_START

      public static final int VARIABLE_BLOCK_START
      See Also:
    • MAX_SIZE

      public static final int MAX_SIZE
      See Also:
    • sessionId

      @Nonnull public String sessionId
    • localUfrag

      @Nonnull public String localUfrag
    • localPassword

      @Nonnull public String localPassword
    • remoteUfrag

      @Nonnull public String remoteUfrag
    • remotePassword

      @Nonnull public String remotePassword
    • remoteCandidates

      @Nonnull public HostAddress[] remoteCandidates
    • remove

      public boolean remove
  • Constructor Details

    • ConfigureIcePeer

      public ConfigureIcePeer()
    • ConfigureIcePeer

      public ConfigureIcePeer(@Nonnull String sessionId, @Nonnull String localUfrag, @Nonnull String localPassword, @Nonnull String remoteUfrag, @Nonnull String remotePassword, @Nonnull HostAddress[] remoteCandidates, boolean remove)
    • ConfigureIcePeer

      public ConfigureIcePeer(@Nonnull ConfigureIcePeer other)
  • Method Details

    • getId

      public int getId()
      Description copied from interface: Packet
      Returns the unique packet ID.
      Specified by:
      getId in interface Packet
    • getChannel

      public NetworkChannel getChannel()
      Description copied from interface: Packet
      Returns the channel this packet should be sent on.
      Specified by:
      getChannel in interface Packet
    • requireBounds

      public static void requireBounds(MemorySegment mem, int offset)
      Checks that the fixed block fits. The per-field getters read without their own bound check, so call this once before reading fields out of an untrusted segment.
    • getSessionId

      public static String getSessionId(MemorySegment mem)
    • getSessionId

      public static String getSessionId(MemorySegment mem, int offset)
    • getLocalUfrag

      public static String getLocalUfrag(MemorySegment mem)
    • getLocalUfrag

      public static String getLocalUfrag(MemorySegment mem, int offset)
    • getLocalPassword

      public static String getLocalPassword(MemorySegment mem)
    • getLocalPassword

      public static String getLocalPassword(MemorySegment mem, int offset)
    • getRemoteUfrag

      public static String getRemoteUfrag(MemorySegment mem)
    • getRemoteUfrag

      public static String getRemoteUfrag(MemorySegment mem, int offset)
    • getRemotePassword

      public static String getRemotePassword(MemorySegment mem)
    • getRemotePassword

      public static String getRemotePassword(MemorySegment mem, int offset)
    • getRemoteCandidates

      public static HostAddress[] getRemoteCandidates(MemorySegment mem)
    • getRemoteCandidates

      public static HostAddress[] getRemoteCandidates(MemorySegment mem, int offset)
    • getRemove

      public static boolean getRemove(MemorySegment mem)
    • getRemove

      public static boolean getRemove(MemorySegment mem, int offset)
    • toObject

      public static ConfigureIcePeer toObject(MemorySegment mem)
    • toObject

      public static ConfigureIcePeer toObject(MemorySegment mem, int offset)
    • toObject

      public static ConfigureIcePeer toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one ConfigureIcePeer and reports the end of its encoding through the cursor. The variable block is decoded in field order against a running position, and each offset slot must name that position, so the fields decoded are the bytes walked.
    • serialize

      public int serialize(@Nonnull MemorySegment mem, int offset)
      Description copied from interface: Packet
      Writes this packet at offset and returns the number of bytes written, which callers rely on being exactly Packet.computeSize(). The framed write path reserves and length-prefixes on that figure before serializing, so a shorter or longer write corrupts the frame rather than failing.
      Specified by:
      serialize in interface Packet
    • computeSize

      public int computeSize()
      Description copied from interface: Packet
      Compute the exact number of bytes needed to serialize this packet.
      Specified by:
      computeSize in interface Packet
    • clone

      public ConfigureIcePeer clone()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object