X13.Periphery.MsConnect.MsConnect C# (CSharp) Method

MsConnect() public method

public MsConnect ( byte buf, int start, int end ) : System
buf byte
start int
end int
return System
    public MsConnect(byte[] buf, int start, int end)
      : base(buf, start, end) {
      int ptr=buf[start+0]==1?start+4:start+2;
      Will=(buf[ptr] & 8)!=0;
      CleanSession=(buf[ptr] & 4)!=0;
      ptr++;
      if(buf[ptr++]!=1) {
        throw new ArgumentException("Unknown ProtocolId");
      }
      Duration=(ushort)((buf[ptr++]<<8) | buf[ptr++]);
      ClientId=enc.GetString(buf, ptr, _length+start-ptr);
    }