_sendCLOSE() private method

private _sendCLOSE ( byte handle, Header header ) : bool
handle byte
header Header
return bool
        public override void Close()
        {
            if (!init)
            {
                try
                {
                    int _ackcount = sftp.seq - startid;
                    while (_ackcount > ackcount)
                    {
                        if (!sftp.checkStatus(null, header))
                        {
                            break;
                        }
                        ackcount++;
                    }
                }
                catch (SftpException e)
                {
                    throw new IOException(e.ToString());
                }
            }

            if (monitor != null)
            {
                monitor.end();
            }
            try{ sftp._sendCLOSE(handle, header); }
            catch (IOException e) { throw e; }
            catch (Exception e)
            {
                throw new IOException(e.ToString());
            }
        }
Esempio n. 2
0
 public override void Close()
 {
     if (closed)
     {
         return;
     }
     closed = true;
     if (monitor != null)
     {
         monitor.end();
     }
     try { sftp._sendCLOSE(handle, header); }
     catch (Exception) { throw new System.IO.IOException("error"); }
 }