예제 #1
0
 public void PublishLeadingFields(BinaryWriter output)
 {
     EnDecodeIO.WriteDecimalAsBCD(output, (decimal)this.TransactionId, 2, 0);
     output.Write(Encoding.UTF8.GetBytes(this.address.ToArray(), 0, 4));
     output.Write((byte)this.messageType);
     output.Write((byte)this.compressionType);
     output.Write((byte)this.encryptionType);
     output.Write(this.dataLength);
 }
예제 #2
0
 private void ParseHeader(BinaryReader input)
 {
     this.TransactionId   = (UInt32)EnDecodeIO.ReadDecimalAsBCD(input, 2, 0);
     this.address         = Encoding.UTF8.GetString(input.ReadBytes(4));
     this.messageType     = (MessageType)input.ReadByte();
     this.compressionType = (CompressionType)input.ReadByte();
     this.encryptionType  = (EncryptionType)input.ReadByte();
     this.dataLength      = input.ReadByte();
 }