SetReceptionHandler() public method

public SetReceptionHandler ( IByteAsyncInputStream output ) : void
output IByteAsyncInputStream
return void
Esempio n. 1
0
 public void OpenKeyboardInteractiveShell()
 {
     _channelHandler = new SSHChannelHandler(new NullSSHChannel(), OnNormalTerminationCore, OnAbnormalTerminationCore);
     if (_callback != null)
     {
         _channelHandler.SetReceptionHandler(_callback);
     }
 }
Esempio n. 2
0
 public void RepeatAsyncRead(IByteAsyncInputStream cb)
 {
     _callback = cb;
     if (_channelHandler != null)
     {
         _channelHandler.SetReceptionHandler(cb);
     }
 }
Esempio n. 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;
        }
Esempio n. 4
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;
        }
Esempio n. 5
0
 public void OpenKeyboardInteractiveShell()
 {
     _channelHandler = new SSHChannelHandler(new NullSSHChannel(), OnNormalTerminationCore, OnAbnormalTerminationCore);
     if (_callback != null) {
         _channelHandler.SetReceptionHandler(_callback);
     }
 }