public void connect() throws IOException {
        if (isConnected() && tree.session.transport.tconHostName == null) {
            /* Tree thinks it is connected but transport disconnected
             * under it, reset tree to reflect the truth.
             */
            tree.treeDisconnect(true);
        }

        if( isConnected() ) {
            return;
        }

        getUncPath0();
        getFirstAddress();
        for ( ;; ) {
            try {
                doConnect();
                return;
            } catch(SmbAuthException sae) {
                throw sae; // Prevents account lockout on servers with multiple IPs
            } catch(SmbException se) {
                if (getNextAddress() == null) 
                    throw se;
                if (log.level >= 3)
                    se.printStackTrace(log);
            }
        }
    }
public void connect ( ) throws IOException { if ( isConnected ( ) && tree . session . transport . tconHostName == null ) { tree . treeDisconnect ( true ) ; } if ( isConnected ( ) ) { return ; } getUncPath0 ( ) ; getFirstAddress ( ) ; for ( ; ; ) { try { doConnect ( ) ; return ; } catch ( SmbAuthException sae ) { throw sae ; } catch ( SmbException se ) { if ( getNextAddress ( ) == null ) throw se ; if ( log . level >= 3 ) se . printStackTrace ( log ) ; } } }
It is not necessary to call this method directly. This is the
<tt>URLConnection</tt> implementation of <tt>connect()</tt>.