Esempio n. 1
0
 private void ReadMessageTypeID(BinaryReader br)
 {
     MessageTypeID = (RTMPMessageTypeID)br.ReadByte();
 }
Esempio n. 2
0
 protected virtual void ReceiveS0(BinaryReader br)
 {
     S0 = new byte[] { br.ReadByte() };
 }
Esempio n. 3
0
 private void ReadFormatAndChunkStreamID(BinaryReader br)
 {
     byte fmt = br.ReadByte();
     Format = (RTMPMessageFormat)(fmt >> 6); // b11000000
     //chunk stream id
     byte csid = (byte)(fmt & 0x3f); // b00111111
     switch (csid)
     {
         case 0: //extended with 1 byte
             byte next1 = br.ReadByte();
             ChunkStreamID = (RTMPMessageChunkStreamID)(64 + next1);
             break;
         case 1: //extended with 2 bytes
             next1 = br.ReadByte();
             byte next2 = br.ReadByte();
             ChunkStreamID = (RTMPMessageChunkStreamID)(64 + next1 + (next2 * 256));
             break;
         case 2: //low level message
             ChunkStreamID = RTMPMessageChunkStreamID.LowLevelMessage;
             break;
         default:
             ChunkStreamID = (RTMPMessageChunkStreamID)csid;
             break;
     }
 }