public class QueryThread extends RConThread
Modifier and Type | Class and Description |
---|---|
(package private) class |
QueryThread.Auth |
Modifier and Type | Field and Description |
---|---|
private byte[] |
buffer |
private java.util.Map<java.net.SocketAddress,java.lang.String> |
idents |
private java.net.DatagramPacket |
incomingPacket |
private long |
lastAuthCheckTime |
private long |
lastQueryResponseTime |
private int |
maxPlayers |
private RConOutputStream |
output |
private java.util.Map<java.net.SocketAddress,QueryThread.Auth> |
queryClients |
private java.lang.String |
queryHostname |
private int |
queryPort |
private java.net.DatagramSocket |
querySocket |
private java.lang.String |
serverHostname |
private java.lang.String |
serverMotd |
private int |
serverPort |
private long |
time |
private java.lang.String |
worldName |
maxStopWait, rconThread, running, server, serverSocketList, socketList, threadName
Constructor and Description |
---|
QueryThread(IServer p_i1536_1_) |
Modifier and Type | Method and Description |
---|---|
private void |
cleanQueryClientsMap() |
private byte[] |
createQueryResponse(java.net.DatagramPacket requestPacket) |
private byte[] |
getRequestID(java.net.SocketAddress address) |
private boolean |
initQuerySystem() |
private boolean |
parseIncomingPacket(java.net.DatagramPacket requestPacket) |
void |
run() |
private void |
sendAuthChallenge(java.net.DatagramPacket requestPacket) |
private void |
sendResponsePacket(byte[] data,
java.net.DatagramPacket requestPacket) |
void |
startThread() |
private void |
stopWithException(java.lang.Exception exception) |
private java.lang.Boolean |
verifyClientAuth(java.net.DatagramPacket requestPacket) |
closeAllSockets_do, closeAllSockets, closeServerSocket_do, closeServerSocket, closeSocket, func_219591_b, getNumberOfPlayers, isRunning, logDebug, logInfo, logSevere, logWarning, registerSocket
private long lastAuthCheckTime
private final int queryPort
private final int serverPort
private final int maxPlayers
private final java.lang.String serverMotd
private final java.lang.String worldName
private java.net.DatagramSocket querySocket
private final byte[] buffer
private java.net.DatagramPacket incomingPacket
private final java.util.Map<java.net.SocketAddress,java.lang.String> idents
private java.lang.String queryHostname
private java.lang.String serverHostname
private final java.util.Map<java.net.SocketAddress,QueryThread.Auth> queryClients
private final long time
private final RConOutputStream output
private long lastQueryResponseTime
public QueryThread(IServer p_i1536_1_)
private void sendResponsePacket(byte[] data, java.net.DatagramPacket requestPacket) throws java.io.IOException
java.io.IOException
private boolean parseIncomingPacket(java.net.DatagramPacket requestPacket) throws java.io.IOException
java.io.IOException
private byte[] createQueryResponse(java.net.DatagramPacket requestPacket) throws java.io.IOException
java.io.IOException
private byte[] getRequestID(java.net.SocketAddress address)
private java.lang.Boolean verifyClientAuth(java.net.DatagramPacket requestPacket)
private void sendAuthChallenge(java.net.DatagramPacket requestPacket) throws java.io.IOException
java.io.IOException
private void cleanQueryClientsMap()
public void run()
public void startThread()
startThread
in class RConThread
private void stopWithException(java.lang.Exception exception)
private boolean initQuerySystem()