|  | @@ -15,32 +15,12 @@ namespace Renci.SshNet.Messages.Connection
 | 
	
		
			
				|  |  |          /// <value>
 | 
	
		
			
				|  |  |          /// The name of the request.
 | 
	
		
			
				|  |  |          /// </value>
 | 
	
		
			
				|  |  | -        public string RequestName
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -            get
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                return this.Info.RequestName;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +        public string RequestName { get; private set; }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  | -        /// Gets a value indicating whether the reply is needed.
 | 
	
		
			
				|  |  | +        /// Gets channel request data.
 | 
	
		
			
				|  |  |          /// </summary>
 | 
	
		
			
				|  |  | -        /// <value>
 | 
	
		
			
				|  |  | -        ///   <c>true</c> if reply is needed; otherwise, <c>false</c>.
 | 
	
		
			
				|  |  | -        /// </value>
 | 
	
		
			
				|  |  | -        public bool WantReply
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -            get
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                return this.Info.WantReply;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        /// <summary>
 | 
	
		
			
				|  |  | -        /// Gets channel request information.
 | 
	
		
			
				|  |  | -        /// </summary>
 | 
	
		
			
				|  |  | -        public RequestInfo Info { get; private set; }
 | 
	
		
			
				|  |  | +        public byte[] RequestData { get; private set; }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  |          /// Initializes a new instance of the <see cref="ChannelRequestMessage"/> class.
 | 
	
	
		
			
				|  | @@ -58,7 +38,8 @@ namespace Renci.SshNet.Messages.Connection
 | 
	
		
			
				|  |  |          public ChannelRequestMessage(uint localChannelName, RequestInfo info)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              this.LocalChannelNumber = localChannelName;
 | 
	
		
			
				|  |  | -            this.Info = info;
 | 
	
		
			
				|  |  | +            this.RequestName = info.RequestName;
 | 
	
		
			
				|  |  | +            this.RequestData = info.GetBytes();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
	
		
			
				|  | @@ -68,59 +49,8 @@ namespace Renci.SshNet.Messages.Connection
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              base.LoadData();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            var requestName = this.ReadString();
 | 
	
		
			
				|  |  | -            var bytes = this.ReadBytes();
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            if (requestName == EnvironmentVariableRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new EnvironmentVariableRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == ExecRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new ExecRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == ExitSignalRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new ExitSignalRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == ExitStatusRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new ExitStatusRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == PseudoTerminalRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new PseudoTerminalRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == ShellRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new ShellRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == SignalRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new SignalRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == SubsystemRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new SubsystemRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == WindowChangeRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new WindowChangeRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == X11ForwardingRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new X11ForwardingRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else if (requestName == XonXoffRequestInfo.NAME)
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                this.Info = new XonXoffRequestInfo();
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            else
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -                throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, "Request '{0}' is not supported.", requestName));
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            this.Info.Load(bytes);
 | 
	
		
			
				|  |  | +            this.RequestName = this.ReadString();
 | 
	
		
			
				|  |  | +            this.RequestData = this.ReadBytes();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
	
		
			
				|  | @@ -131,7 +61,7 @@ namespace Renci.SshNet.Messages.Connection
 | 
	
		
			
				|  |  |              base.SaveData();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              this.Write(this.RequestName);
 | 
	
		
			
				|  |  | -            this.Write(this.Info.GetBytes());
 | 
	
		
			
				|  |  | +            this.Write(this.RequestData);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 |