Package net.minecraft.network.rcon
Class QueryThread
- java.lang.Object
-
- net.minecraft.network.rcon.RConThread
-
- net.minecraft.network.rcon.QueryThread
-
- All Implemented Interfaces:
java.lang.Runnable
public class QueryThread extends RConThread
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
QueryThread.Auth
-
Field Summary
Fields Modifier and Type Field Description private byte[]
buffer
private java.lang.String
hostIp
private long
lastChallengeCheck
private long
lastRulesResponse
private static org.apache.logging.log4j.Logger
LOGGER
private int
maxPlayers
private int
port
private RConOutputStream
rulesResponse
private IServer
serverInterface
private java.lang.String
serverIp
private java.lang.String
serverName
private int
serverPort
private java.net.DatagramSocket
socket
private java.util.Map<java.net.SocketAddress,QueryThread.Auth>
validChallenges
private java.lang.String
worldName
-
Fields inherited from class net.minecraft.network.rcon.RConThread
name, running, thread
-
-
Constructor Summary
Constructors Modifier Constructor Description private
QueryThread(IServer p_i241890_1_, int p_i241890_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private byte[]
buildRuleResponse(java.net.DatagramPacket p_72624_1_)
static QueryThread
create(IServer p_242129_0_)
private byte[]
getIdentBytes(java.net.SocketAddress p_72625_1_)
private boolean
initSocket()
private boolean
processPacket(java.net.DatagramPacket p_72621_1_)
private void
pruneChallenges()
private void
recoverSocketError(java.lang.Exception p_72623_1_)
void
run()
private void
sendChallenge(java.net.DatagramPacket p_72622_1_)
private void
sendTo(byte[] p_72620_1_, java.net.DatagramPacket p_72620_2_)
boolean
start()
private java.lang.Boolean
validChallenge(java.net.DatagramPacket p_72627_1_)
-
Methods inherited from class net.minecraft.network.rcon.RConThread
isRunning, stop
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
lastChallengeCheck
private long lastChallengeCheck
-
port
private final int port
-
serverPort
private final int serverPort
-
maxPlayers
private final int maxPlayers
-
serverName
private final java.lang.String serverName
-
worldName
private final java.lang.String worldName
-
socket
private java.net.DatagramSocket socket
-
buffer
private final byte[] buffer
-
hostIp
private java.lang.String hostIp
-
serverIp
private java.lang.String serverIp
-
validChallenges
private final java.util.Map<java.net.SocketAddress,QueryThread.Auth> validChallenges
-
rulesResponse
private final RConOutputStream rulesResponse
-
lastRulesResponse
private long lastRulesResponse
-
serverInterface
private final IServer serverInterface
-
-
Constructor Detail
-
QueryThread
private QueryThread(IServer p_i241890_1_, int p_i241890_2_)
-
-
Method Detail
-
create
@Nullable public static QueryThread create(IServer p_242129_0_)
-
sendTo
private void sendTo(byte[] p_72620_1_, java.net.DatagramPacket p_72620_2_) throws java.io.IOException
- Throws:
java.io.IOException
-
processPacket
private boolean processPacket(java.net.DatagramPacket p_72621_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
buildRuleResponse
private byte[] buildRuleResponse(java.net.DatagramPacket p_72624_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
getIdentBytes
private byte[] getIdentBytes(java.net.SocketAddress p_72625_1_)
-
validChallenge
private java.lang.Boolean validChallenge(java.net.DatagramPacket p_72627_1_)
-
sendChallenge
private void sendChallenge(java.net.DatagramPacket p_72622_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
pruneChallenges
private void pruneChallenges()
-
run
public void run()
-
start
public boolean start()
- Overrides:
start
in classRConThread
-
recoverSocketError
private void recoverSocketError(java.lang.Exception p_72623_1_)
-
initSocket
private boolean initSocket()
-
-