PeerCastStation.FLV.RTMP.RTMPBinaryReader.ReadUInt16 C# (CSharp) Method

ReadUInt16() public method

public ReadUInt16 ( ) : int
return int
    public int ReadUInt16()
    {
      var bytes = new byte[2];
      BaseStream.Read(bytes, 0, 2);
      if (BitConverter.IsLittleEndian) Array.Reverse(bytes);
      return BitConverter.ToUInt16(bytes, 0);
    }

Usage Example

Ejemplo n.º 1
0
 public PingResponseMessage(RTMPMessage x)
     : base(x)
 {
     using (var reader = new RTMPBinaryReader(new MemoryStream(x.Body))) {
         var type = (UserControlMessageType)reader.ReadUInt16();
         LocalTimestamp = reader.ReadUInt32();
     }
 }
All Usage Examples Of PeerCastStation.FLV.RTMP.RTMPBinaryReader::ReadUInt16