Exemple #1
0
 internal MQTSH(int tshType, IMQCommsBuffer buffer)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%");
     this.multiplexing = false;
     if (!this.multiplexing)
     {
         this.tsh        = new structMQTSH();
         this.tsh._Id    = new byte[4];
         this.tsh._LUWID = BLANK_LUWID;
         if (tshType == 2)
         {
             Buffer.BlockCopy(rfpTSH_C_ID, 0, this.tsh._Id, 0, 4);
         }
         else
         {
             this.tsh._Id = rfpTSH_ID;
             Buffer.BlockCopy(rfpTSH_ID, 0, this.tsh._Id, 0, 4);
         }
     }
     else
     {
         this.tshM     = new structMQTSHM();
         this.tshM._Id = new byte[4];
         Buffer.BlockCopy(rfpTSH_M_ID, 0, this.tshM._Id, 0, 4);
         this.tshM._LUWID = BLANK_LUWID;
     }
     if (buffer != null)
     {
         this.parentBuffer = buffer;
         this.tshBuffer    = this.parentBuffer.Buffer;
         this.Offset       = this.parentBuffer.DataPosition;
         this.Length       = 0;
     }
 }
Exemple #2
0
 internal MQTSH(bool IsMultiplexingEnabled, IMQCommsBuffer buffer)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { IsMultiplexingEnabled });
     this.multiplexing = IsMultiplexingEnabled;
     if (!this.multiplexing)
     {
         this.tsh     = new structMQTSH();
         this.tsh._Id = new byte[4];
         Buffer.BlockCopy(rfpTSH_ID, 0, this.tsh._Id, 0, 4);
         this.tsh._LUWID = BLANK_LUWID;
     }
     else
     {
         this.tshM     = new structMQTSHM();
         this.tshM._Id = new byte[4];
         Buffer.BlockCopy(rfpTSH_M_ID, 0, this.tshM._Id, 0, 4);
         this.tshM._LUWID = BLANK_LUWID;
     }
     if (buffer != null)
     {
         this.parentBuffer = buffer;
         this.tshBuffer    = this.parentBuffer.Buffer;
         this.Offset       = this.parentBuffer.DataPosition;
         this.Length       = 0;
     }
 }