示例#1
0
        /// <summary>
        /// Reads the data from a memory buffer into this packet object.
        /// </summary>
        /// <param name="data">The data to be read.</param>
        /// <remarks>
        /// Decodes the raw data into usable information.
        /// </remarks>
        public override void ReadData(TCNetBinaryReader data)
        {
            base.ReadData(data);

            data.ReadByte();
            TrackID     = data.ReadNetwork16();
            TrackArtist = data.ReadNetworkString(256);
            TrackTitle  = data.ReadNetworkString(256);
            //TrackKey = data.ReadNetwork16();
        }
示例#2
0
 /// <summary>
 /// Reads the data from a memory buffer into this packet object.
 /// </summary>
 /// <param name="data">The data to be read.</param>
 /// <remarks>
 /// Decodes the raw data into usable information.
 /// </remarks>
 public override void ReadData(TCNetBinaryReader data)
 {
     NodeID          = data.ReadNetwork16();
     ProtocolVersion = new Version(data.ReadByte(), data.ReadByte());
     Header          = data.ReadNetworkString(3);
     MessageType     = (MessageTypes)data.ReadByte();
     NodeName        = data.ReadNetworkString(8);
     SequenceNumber  = data.ReadByte();
     NodeType        = (NodeType)data.ReadByte();
     NodeOptions     = (NodeOptions)data.ReadNetwork16();
     Timestamp       = TimeSpan.FromTicks(data.ReadNetwork32() * (TimeSpan.TicksPerSecond / 1000000));
 }
示例#3
0
        /// <summary>
        /// Reads the data from a memory buffer into this packet object.
        /// </summary>
        /// <param name="data">The data to be read.</param>
        /// <remarks>
        /// Decodes the raw data into usable information.
        /// </remarks>
        public override void ReadData(TCNetBinaryReader data)
        {
            base.ReadData(data);

            NodeCount        = data.ReadNetwork16();
            NodeListenerPort = data.ReadNetwork16();
            Uptime           = TimeSpan.FromSeconds(data.ReadNetwork16());
            data.ReadBytes(2);
            VendorName    = data.ReadNetworkString(16);
            DeviceName    = data.ReadNetworkString(16);
            DeviceVersion = new Version(data.ReadByte(), data.ReadByte(), data.ReadByte());
            data.ReadBytes(1);
        }
示例#4
0
        /// <summary>
        /// Reads the data from a memory buffer into this packet object.
        /// </summary>
        /// <param name="data">The data to be read.</param>
        /// <remarks>
        /// Decodes the raw data into usable information.
        /// </remarks>
        public override void ReadData(TCNetBinaryReader data)
        {
            base.ReadData(data);

            Step = (Steps)data.ReadByte();
            data.ReadByte();
            int length = (int)data.ReadNetwork32();

            data.ReadBytes(12);
            TextData = data.ReadNetworkString(length);
        }