Package mindustry.net

Class Packet

java.lang.Object
mindustry.net.Packet
Direct Known Subclasses:
Packets.Connect, Packets.ConnectPacket, Packets.Disconnect, Packets.StreamBegin, Packets.StreamChunk, Streamable

public abstract class Packet extends Object
  • Field Details

    • NODATA

      protected static final byte[] NODATA
    • BAIS

      protected static final ReusableByteInStream BAIS
    • READ

      protected static final Reads READ
    • priorityLow

      public static final int priorityLow
      Does not get handled unless client is connected.
      See Also:
    • priorityNormal

      public static final int priorityNormal
      Gets put in a queue and processed if not connected.
      See Also:
    • priorityHigh

      public static final int priorityHigh
      Gets handled immediately, regardless of connection status.
      See Also:
  • Constructor Details

    • Packet

      public Packet()
  • Method Details

    • read

      public void read(Reads read)
    • write

      public void write(Writes write)
    • read

      public void read(Reads read, int length)
    • handled

      public void handled()
    • getPriority

      public int getPriority()
    • handleClient

      public void handleClient()
    • handleServer

      public void handleServer(NetConnection con)