protected virtual void ReceiveS2(BinaryReader br) { S2 = br.ReadBytes(1536); // S2 (copy of C1) }
protected virtual void ReceiveS1(BinaryReader br) { S1 = br.ReadBytes(1536); // S1 }
private void ReadMessageLength(BinaryReader br) { byte[] bodysize = br.ReadBytes(3); MessageLength = 0; MessageLength |= bodysize[0] << 16; MessageLength |= bodysize[1] << 8; MessageLength |= bodysize[2]; }
private void ReadTimestamp(BinaryReader br) { // timestamp byte[] tmstmp = br.ReadBytes(3); Timestamp = 0; Timestamp |= (uint)(tmstmp[0] << 16); Timestamp |= (uint)(tmstmp[1] << 8); Timestamp |= (uint)tmstmp[2]; extendedTimeStamp = Timestamp == 0xFFFFFF; // extended timestamp, 4 bytes }
private void ReadExtendedTimestamp(BinaryReader br) { if (extendedTimeStamp) { byte[] tmstmp = br.ReadBytes(4); Timestamp = 0; Timestamp |= (uint)(tmstmp[0] << 24); Timestamp |= (uint)(tmstmp[1] << 16); Timestamp |= (uint)(tmstmp[2] << 8); Timestamp |= (uint)tmstmp[3]; } }