Package mindustry.net

Class NetConnection

java.lang.Object
mindustry.net.NetConnection

public abstract class NetConnection extends Object
  • Field Details

    • address

      public final String address
    • uuid

      public String uuid
    • usid

      public String usid
    • mobile

      public boolean mobile
    • modclient

      public boolean modclient
    • player

      @Nullable public mindustry.gen.Player player
    • kicked

      public boolean kicked
    • syncTime

      public long syncTime
    • connectTime

      public long connectTime
      When this connection was established.
    • lastReceivedClientSnapshot

      public int lastReceivedClientSnapshot
      ID of last received client snapshot.
    • snapshotsSent

      public int snapshotsSent
      Count of snapshots sent from server.
    • lastReceivedClientTime

      public long lastReceivedClientTime
      Timestamp of last received snapshot.
    • rejectedRequests

      public Seq<BuildPlan> rejectedRequests
      Build requests that have been recently rejected. This is cleared every snapshot.
    • chatRate

      public Ratekeeper chatRate
      Handles chat spam rate limits.
    • packetRate

      public Ratekeeper packetRate
      Handles packet spam rate limits.
    • hasConnected

      public boolean hasConnected
    • hasBegunConnecting

      public boolean hasBegunConnecting
    • hasDisconnected

      public boolean hasDisconnected
    • viewWidth

      public float viewWidth
    • viewHeight

      public float viewHeight
    • viewX

      public float viewX
    • viewY

      public float viewY
  • Constructor Details

    • NetConnection

      public NetConnection(String address)
  • Method Details

    • kick

      public void kick()
      Kick with the standard kick reason.
    • kick

      public void kick(Packets.KickReason reason)
      Kick with a special, localized reason. Use this if possible.
    • kick

      public void kick(Packets.KickReason reason, long kickDuration)
      Kick with a special, localized reason. Use this if possible.
    • kick

      public void kick(String reason)
      Kick with an arbitrary reason.
    • kick

      public void kick(String reason, long duration)
      Kick with an arbitrary reason.
    • isConnected

      public boolean isConnected()
    • sendStream

      public void sendStream(Streamable stream)
    • send

      public abstract void send(Object object, boolean reliable)
    • close

      public abstract void close()