Class QueryThread

  • All Implemented Interfaces:
    java.lang.Runnable

    public class QueryThread
    extends RConThread
    • 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
      • lastRulesResponse

        private long lastRulesResponse
      • serverInterface

        private final IServer serverInterface
    • Constructor Detail

      • QueryThread

        private QueryThread​(IServer p_i241890_1_,
                            int p_i241890_2_)
    • Method Detail

      • 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()
      • recoverSocketError

        private void recoverSocketError​(java.lang.Exception p_72623_1_)
      • initSocket

        private boolean initSocket()