Code example for LinkedBlockingQueue

Methods: add

0
     */ 
    boolean addPacketToSend(byte[] data, int length)
    { 
        if (data == null || length == 0)
            return false; 
        return mPacketSendQueue.add(createDatagramPacket(data, length));
    } 
 
    /** 
     * Add a datagram packet to be server, pre-formatted 
     *  
     * @param packet 
     * @return 
     */ 
    boolean addPacketToSend(DatagramPacket packet)
    { 
        if (packet == null)
            return false; 
        return mPacketSendQueue.add(createDatagramPacket(packet));
    }