Code example for DatagramPacket

Methods: getDatagetLengthgetSocketAddress

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 
Stop searching for code, let great code find you!  Add Codota to your java IDE