Inheritance: ISSHChannelEventHandler
Example #1
0
 public void OpenKeyboardInteractiveShell()
 {
     _channelHandler = new SSHChannelHandler(new NullSSHChannel(), OnNormalTerminationCore, OnAbnormalTerminationCore);
     if (_callback != null)
     {
         _channelHandler.SetReceptionHandler(_callback);
     }
 }
Example #2
0
        public void OpenShell()
        {
            var channelHandler =
                _connection.OpenShell(
                    channelOperator => {
                var handler = new SSHChannelHandler(channelOperator, OnNormalTerminationCore, OnAbnormalTerminationCore);
                if (_callback != null)
                {
                    handler.SetReceptionHandler(_callback);
                }
                return(handler);
            }
                    );

            bool isReady = channelHandler.Operator.WaitReady();

            if (!isReady)
            {
                ForceDisposed();
                throw new Exception(PEnv.Strings.GetString("Message.SSHSocket.FailedToStartShell"));
            }

            _channelHandler = channelHandler;
        }
Example #3
0
        public void OpenShell()
        {
            var channelHandler =
                _connection.OpenShell(
                    channelOperator => {
                        var handler = new SSHChannelHandler(channelOperator, OnNormalTerminationCore, OnAbnormalTerminationCore);
                        if (_callback != null) {
                            handler.SetReceptionHandler(_callback);
                        }
                        return handler;
                    }
                );

            bool isReady = channelHandler.Operator.WaitReady();
            if (!isReady) {
                ForceDisposed();
                throw new Exception(PEnv.Strings.GetString("Message.SSHSocket.FailedToStartShell"));
            }

            _channelHandler = channelHandler;
        }
Example #4
0
 public void OpenKeyboardInteractiveShell()
 {
     _channelHandler = new SSHChannelHandler(new NullSSHChannel(), OnNormalTerminationCore, OnAbnormalTerminationCore);
     if (_callback != null) {
         _channelHandler.SetReceptionHandler(_callback);
     }
 }