Ejemplo n.º 1
0
        private void HandleMessage(ShellRequestMessage message)
        {
            var channel = FindChannelByServerId <SessionChannel>(message.RecipientChannel);

            if (message.WantReply)
            {
                _session.SendMessage(new ChannelSuccessMessage {
                    RecipientChannel = channel.ClientChannelId
                });
            }

            CommandOpened?.Invoke(this, new CommandRequestedArgs(channel, "shell", null, _auth));
        }
Ejemplo n.º 2
0
        private void HandleMessage(ShellRequestMessage message)
        {
            var channel = FindChannelByServerId <SessionChannel>(message.RecipientChannel);

            _session.SendMessage(new ChannelSuccessMessage {
                RecipientChannel = channel.ClientChannelId
            });

            if (CommandOpened != null)
            {
                var args = new SessionRequestedArgs(channel, message.RequestType, _auth);
                CommandOpened(this, args);
            }
        }
        private void HandleMessage(ShellRequestMessage message)
        {
            var channel = this.FindChannelByServerId <SessionChannel>(message.RecipientChannel);

            if (message.WantReply)
            {
                this.Session.SendMessage(new ChannelSuccessMessage {
                    RecipientChannel = channel.ClientChannelId
                });
            }

            if (this.CommandOpened == null)
            {
                return;
            }
            var args = new SessionRequestedArgs(channel, "shell", this.auth);

            this.CommandOpened(this, args);
        }