Beispiel #1
0
        public override void start()
        {
            try
            {
                Request request;

                if (m_xforwading)
                {
                    request = new RequestX11();
                    request.request(m_session, this);
                }

                if (m_pty)
                {
                    request = new RequestPtyReq();
                    request.request(m_session, this);
                }

                request = new RequestExec(m_command);
                request.request(m_session, this);
            }
            catch (Exception)
            {
                throw new JSchException("ChannelExec");
            }
            m_thread = new Thread(this);
            m_thread.Name = "Exec thread " + m_session.Host;
            m_thread.Start();
        }
Beispiel #2
0
 public override void start()
 {
     try
     {
         Request request;
         if (m_xforwading)
         {
             request = new RequestX11();
             request.request(m_session, this);
         }
         if (m_pty)
         {
             request = new RequestPtyReq();
             request.request(m_session, this);
         }
         request = new RequestShell();
         request.request(m_session, this);
     }
     catch//(Exception e)
     {
         throw new JSchException("ChannelShell");
     }
     m_thread = new Thread(this);
     m_thread.Name = "Shell for " + m_session.m_host;
     m_thread.Start();
 }