Package net.minecraft.server.rcon.thread
Class QueryThreadGs4
java.lang.Object
net.minecraft.server.rcon.thread.GenericThread
net.minecraft.server.rcon.thread.QueryThreadGs4
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private static longprivate static Stringprivate static Stringprivate Stringprivate longprivate longprivate static org.apache.logging.log4j.Loggerprivate intprivate intprivate static longprivate NetworkDataOutputStreamprivate ServerInterfaceprivate Stringprivate Stringprivate intprivate DatagramSocketprivate Map<SocketAddress,QueryThreadGs4.RequestChallenge>private StringFields inherited from class net.minecraft.server.rcon.thread.GenericThread
name, running, thread -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]buildRuleResponse(DatagramPacket p_11559_)static QueryThreadGs4create(ServerInterface p_11554_)private byte[]getIdentBytes(SocketAddress p_11552_)private booleanprivate booleanprocessPacket(DatagramPacket p_11550_)private voidprivate voidrecoverSocketError(Exception p_11548_)voidrun()private voidsendChallenge(DatagramPacket p_11564_)private voidsendTo(byte[] p_11556_, DatagramPacket p_11557_)booleanstart()private BooleanvalidChallenge(DatagramPacket p_11561_)Methods inherited from class net.minecraft.server.rcon.thread.GenericThread
isRunning, stop
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
GAME_TYPE
- See Also:
- Constant Field Values
-
GAME_ID
- See Also:
- Constant Field Values
-
CHALLENGE_CHECK_INTERVAL
private static final long CHALLENGE_CHECK_INTERVAL- See Also:
- Constant Field Values
-
RESPONSE_CACHE_TIME
private static final long RESPONSE_CACHE_TIME- See Also:
- Constant Field Values
-
lastChallengeCheck
private long lastChallengeCheck -
port
private final int port -
serverPort
private final int serverPort -
maxPlayers
private final int maxPlayers -
serverName
-
worldName
-
socket
-
buffer
private final byte[] buffer -
hostIp
-
serverIp
-
validChallenges
-
rulesResponse
-
lastRulesResponse
private long lastRulesResponse -
serverInterface
-
-
Constructor Details
-
QueryThreadGs4
-
-
Method Details
-
create
-
sendTo
- Throws:
IOException
-
processPacket
- Throws:
IOException
-
buildRuleResponse
- Throws:
IOException
-
getIdentBytes
-
validChallenge
-
sendChallenge
- Throws:
IOException
-
pruneChallenges
private void pruneChallenges() -
run
public void run() -
start
public boolean start()- Overrides:
startin classGenericThread
-
recoverSocketError
-
initSocket
private boolean initSocket()
-