Code example for DatagramSocket

Methods: isClosed

0
 
        private UdpListenThread(final DatagramSocket socket, final OnDataReceivedListener listener)
        { 
            mSocket = socket;
            mListener = listener;
            if (mSocket == null || mSocket.isClosed())
            { 
 
                return; 
            } 
            run = true;
            sBus.post(new EventLogOutput("Start listening"));
            start();
        } 
 
        /** 
         * @see java.lang.Thread#run() 
         */ 
        @Override 
        public void run() 
        {