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 final byte[]private static final longprivate static final Stringprivate static final Stringprivate Stringprivate longprivate longprivate static final org.slf4j.Loggerprivate final intprivate final intprivate static final longprivate final NetworkDataOutputStreamprivate final ServerInterfaceprivate Stringprivate final Stringprivate final intprivate DatagramSocketprivate final Map<SocketAddress, QueryThreadGs4.RequestChallenge> private final StringFields inherited from class GenericThread
name, running, thread -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]buildRuleResponse(DatagramPacket packet) static @Nullable QueryThreadGs4create(ServerInterface serverInterface) private byte[]private booleanprivate booleanprocessPacket(DatagramPacket packet) private voidprivate voidvoidrun()private voidprivate voidsendTo(byte[] data, DatagramPacket src) booleanstart()private BooleanMethods inherited from class GenericThread
isRunning, stop
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
GAME_TYPE
- See Also:
-
GAME_ID
- See Also:
-
CHALLENGE_CHECK_INTERVAL
private static final long CHALLENGE_CHECK_INTERVAL- See Also:
-
RESPONSE_CACHE_TIME
private static final long RESPONSE_CACHE_TIME- See Also:
-
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()
-