Exemple #1
0
        public override void start()
        {
            try {
                IRequest request;
                if (xforwading)
                {
                    request = new RequestX11();
                    request.request(session, this);
                }
                if (pty)
                {
                    request = new RequestPtyReq();
                    request.request(session, this);
                }
                request = new RequestSubsystem();
                ((RequestSubsystem)request).request(session, this, subsystem, want_reply);
            }
            catch (Exception e) {
                if (e is SshClientException)
                {
                    throw (SshClientException)e;
                }
                throw new SshClientException("ChannelSubsystem");
            }
            ThreadAux thread = new ThreadAux(this);

            thread.setName("Subsystem for " + session.host);
            thread.start();
        }
 public override void start()
 {
     try {
         IRequest request;
         if (xforwading)
         {
             request = new RequestX11();
             request.request(session, this);
         }
         if (pty)
         {
             request = new RequestPtyReq();
             request.request(session, this);
         }
         request = new RequestShell();
         request.request(session, this);
     }
     catch (Exception) {
         throw new SshClientException("ChannelShell");
     }
     thread = new ThreadAux(this);
     thread.setName("Shell for " + session.host);
     thread.start();
 }