Exemplo n.º 1
0
Arquivo: IO.cs Projeto: x893/SharpSSH
 public void setExtOutputStream(Stream outs)
 {
     if (outs != null)
         m_outs_ext = new JStream(outs);
     else
         m_outs_ext = null;
 }
Exemplo n.º 2
0
Arquivo: IO.cs Projeto: 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)
            { }
        }
Exemplo n.º 3
0
Arquivo: IO.cs Projeto: 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;
 }