@Override
        public void run()
        {
            log.log( Level.FINE, "Kernel started for connection:{0}.", address );

            // An atomic is safest and costs almost nothing.
            while( go.get() ) {
                try {
                    // Could reuse the packet, but I don't see the
                    // point, and it may lead to subtle bugs if not properly
                    // reset.
                    DatagramPacket packet = new DatagramPacket( buffer, buffer.length );
                    socket.receive(packet);

                    newData( packet );
                } catch( IOException e ) {
                    if( !go.get() )
                        return;
                    reportError( e );
                }
            }
        }
Called by the endpoints when they need to be closed.
jme3-networking/src/main/java/com/jme3/network/kernel/udp/UdpKernel.java