Esempio n. 1
0
File: IO.cs Progetto: x893/SharpSSH
 public void setExtOutputStream(Stream outs)
 {
     if (outs != null)
         m_outs_ext = new JStream(outs);
     else
         m_outs_ext = null;
 }
Esempio n. 2
0
File: IO.cs Progetto: x893/SharpSSH
        public void close()
        {
            try
            {
                if (m_ins != null && !m_in_dontclose)
                    m_ins.Close();
                m_ins = null;
            }
            catch (Exception)
            { }

            try
            {
                if (m_outs != null && !m_out_dontclose)
                    m_outs.Close();
                m_outs = null;
            }
            catch (Exception)
            { }

            try
            {
                if (m_outs_ext != null && !m_outs_ext_dontclose)
                    m_outs_ext.Close();
                m_outs_ext = null;
            }
            catch (Exception)
            { }
        }
Esempio n. 3
0
File: IO.cs Progetto: x893/SharpSSH
 public void setInputStream(Stream ins)
 {
     //ConsoleStream low buffer patch
     if (ins != null)
     {
         if (ins.GetType() == Type.GetType("System.IO.__ConsoleStream"))
             ins = new Streams.ProtectedConsoleStream(ins);
         else if (ins.GetType() == Type.GetType("System.IO.FileStream"))
             ins = new Streams.ProtectedConsoleStream(ins);
         m_ins = new JStream(ins);
     }
     else
         m_ins = null;
 }