/// <summary> /// Initializes a new instance of the <see cref="PacketClientMsg"/> class. /// </summary> /// <param name="eMsg">The network message type for this packet message.</param> /// <param name="data">The data.</param> public PacketClientMsg( EMsg eMsg, byte[] data ) { MsgType = eMsg; payload = data; ExtendedClientMsgHdr extendedHdr = new ExtendedClientMsgHdr(); // deserialize the extended header to get our hands on the job ids using ( MemoryStream ms = new MemoryStream( data ) ) { extendedHdr.Deserialize( ms ); } TargetJobID = extendedHdr.TargetJobID; SourceJobID = extendedHdr.SourceJobID; }