Code example for DatagramSocket

Methods: disconnect

0
connected = false;
        connectAddress = null;
        networkSystem.disconnectDatagram(fd);
        if (null != socket) {
            socket.disconnect();
        } 
        return this;
    } 
 
    /** 
     * @see java.nio.channels.DatagramChannel#receive(java.nio.ByteBuffer) 
     */ 
    @Override 
    public SocketAddress receive(ByteBuffer target) throws IOException {
        // must not null and not readonly 
        checkWritable(target);
        // must open 
        checkOpen(); 
 
        if (!isBound) {