示例#1
0
文件: IO.cs 项目: x893/SharpSSH
 public void setExtOutputStream(Stream outs)
 {
     if (outs != null)
         m_outs_ext = new JStream(outs);
     else
         m_outs_ext = null;
 }
示例#2
0
文件: IO.cs 项目: 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)
            { }
        }
示例#3
0
文件: IO.cs 项目: 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;
 }