Code example for DatagramPacket

Methods: getData, getLength, getSocketAddress

0
    /** 
     * Returns true if the client has a valid auth, otherwise false 
     */ 
    private Boolean verifyClientAuth(DatagramPacket par1DatagramPacket)
    { 
        SocketAddress var2 = par1DatagramPacket.getSocketAddress();
 
        if (!this.queryClients.containsKey(var2))
        { 
            return Boolean.valueOf(false);
        } 
        else 
        { 
            byte[] var3 = par1DatagramPacket.getData();
            return ((RConThreadQueryAuth)this.queryClients.get(var2)).getRandomChallenge() != RConUtils.getBytesAsBEint(var3, 7, par1DatagramPacket.getLength()) ? Boolean.valueOf(false) : Boolean.valueOf(true);
        } 
    } 
 
    /** 
     * Sends an auth challenge DatagramPacket to the client and adds the client to the queryClients map 
     */