@Override
    public void send( ByteBuffer data )
    {
        if( !isConnected() ) {
            throw new KernelException( "Endpoint is not connected:" + this );
        }
        
        
        try {
            DatagramPacket p = new DatagramPacket( data.array(), data.position(), 
                                                   data.remaining(), address );
                                                   
            // Just queue it up for the kernel threads to write
            // out
            kernel.enqueueWrite( this, p );
                                                               
            //socket.send(p);
        } catch (Exception e) {
            if (e instanceof SocketException) {
                throw new KernelException("Error sending datagram to:" + address, e);
            } else if (e instanceof RuntimeException) {
                throw (RuntimeException) e;
            } else {
                throw new RuntimeException(e);
            }
        }
    }
Endpoint implementation that encapsulates the
 UDP connection information for return messaging,
 identification of envelope sources, etc.

 @version   $Revision$
 @author    Paul Speed
jme3-networking/src/main/java/com/jme3/network/kernel/udp/UdpEndpoint.java