Package mindustry.net
Class NetConnection
java.lang.Object
mindustry.net.NetConnection
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringarc.util.RatekeeperHandles chat spam rate limits.longWhen this connection was established.booleanbooleanbooleanbooleanintID of last received client snapshot.longTimestamp of last received snapshot.booleanbooleanarc.util.RatekeeperHandles packet spam rate limits.mindustry.gen.Playerarc.struct.Seq<BuildPlan>Build requests that have been recently rejected.intCount of snapshots sent from server.longfloatfloatfloatfloat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidclose()booleanvoidkick()Kick with the standard kick reason.voidKick with an arbitrary reason.voidKick with an arbitrary reason.voidkick(Packets.KickReason reason) Kick with a special, localized reason.voidkick(Packets.KickReason reason, long kickDuration) Kick with a special, localized reason.protected voidabstract voidvoidsendStream(Streamable stream)
-
Field Details
-
address
-
uuid
-
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 connectTimeWhen this connection was established. -
lastReceivedClientSnapshot
public int lastReceivedClientSnapshotID of last received client snapshot. -
snapshotsSent
public int snapshotsSentCount of snapshots sent from server. -
lastReceivedClientTime
public long lastReceivedClientTimeTimestamp of last received snapshot. -
rejectedRequests
Build requests that have been recently rejected. This is cleared every snapshot. -
chatRate
public arc.util.Ratekeeper chatRateHandles chat spam rate limits. -
packetRate
public arc.util.Ratekeeper packetRateHandles 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
-
-
Method Details
-
kick
public void kick()Kick with the standard kick reason. -
kick
Kick with a special, localized reason. Use this if possible. -
kick
Kick with a special, localized reason. Use this if possible. -
kick
Kick with an arbitrary reason. -
kick
Kick with an arbitrary reason. -
kickDisconnect
protected void kickDisconnect() -
isConnected
public boolean isConnected() -
sendStream
-
send
-
close
public abstract void close()
-