Package mindustry.net
Class NetConnection
java.lang.Object
mindustry.net.NetConnection
-
Field Summary
Modifier and TypeFieldDescriptionfinal String
Handles chat spam rate limits.long
When this connection was established.boolean
boolean
boolean
boolean
int
ID of last received client snapshot.long
Timestamp of last received snapshot.boolean
boolean
Handles packet spam rate limits.mindustry.gen.Player
Build requests that have been recently rejected.int
Count of snapshots sent from server.long
float
float
float
float
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
boolean
void
kick()
Kick with the standard kick reason.void
Kick with an arbitrary reason.void
Kick with an arbitrary reason.void
kick
(Packets.KickReason reason) Kick with a special, localized reason.void
kick
(Packets.KickReason reason, long kickDuration) Kick with a special, localized reason.abstract void
void
sendStream
(Streamable stream)
-
Field Details
-
address
-
uuid
-
usid
-
mobile
public boolean mobile -
modclient
public boolean modclient -
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
Handles chat spam rate limits. -
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
-
-
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. -
isConnected
public boolean isConnected() -
sendStream
-
send
-
close
public abstract void close()
-