SharpCifs.Smb.SmbFile.Connect C# (CSharp) Method

Connect() public method

It is not necessary to call this method directly.
It is not necessary to call this method directly. This is the URLConnection implementation of connect().
public Connect ( ) : void
return void
        public void Connect()
        {
            SmbTransport trans;
            SmbSession ssn;
            UniAddress addr;
            if (IsConnected())
            {
                return;
            }
            GetUncPath0();
            GetFirstAddress();
            for (; ; )
            {
                try
                {
                    DoConnect();
                    return;
                }
                catch (SmbAuthException sae)
                {
                    throw;
                }
                catch (SmbException se)
                {
                    // Prevents account lockout on servers with multiple IPs
                    if (GetNextAddress() == null)
                    {
                        throw;
                    }
                    else
                    {
                        RemoveCurrentAddress();
                    }

                    if (Log.Level >= 3)
                    {
                        Runtime.PrintStackTrace(se, Log);
                    }
                }
            }
        }