/// <summary>
        /// Called when type specific data need to be loaded.
        /// </summary>
        protected override void LoadData()
        {
            var channelName = this.ReadAsciiString();

            this.LocalChannelNumber = this.ReadUInt32();
            this.InitialWindowSize  = this.ReadUInt32();
            this.MaximumPacketSize  = this.ReadUInt32();
            var bytes = this.ReadBytes();

            if (channelName == SessionChannelOpenInfo.NAME)
            {
                this.Info = new SessionChannelOpenInfo();
            }
            else if (channelName == X11ChannelOpenInfo.NAME)
            {
                this.Info = new X11ChannelOpenInfo();
            }
            else if (channelName == DirectTcpipChannelInfo.NAME)
            {
                this.Info = new DirectTcpipChannelInfo();
            }
            else if (channelName == ForwardedTcpipChannelInfo.NAME)
            {
                this.Info = new ForwardedTcpipChannelInfo();
            }
            else
            {
                throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, "Channel type '{0}' is not supported.", channelName));
            }

            this.Info.Load(bytes);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ChannelOpenMessage"/> class.
 /// </summary>
 /// <param name="channelNumber">The channel number.</param>
 /// <param name="initialWindowSize">Initial size of the window.</param>
 /// <param name="maximumPacketSize">Maximum size of the packet.</param>
 /// <param name="info">The info.</param>
 public ChannelOpenMessage(uint channelNumber, uint initialWindowSize, uint maximumPacketSize, ChannelOpenInfo info)
 {
     this.LocalChannelNumber = channelNumber;
     this.InitialWindowSize  = initialWindowSize;
     this.MaximumPacketSize  = maximumPacketSize;
     this.Info = info;
 }