public AckTestPhpOk(Packet packet) { this._u64 = packet.ReadUlong(); this._strxx = packet.ReadString(); this._msg_req = new MsgTestPhp(packet); this. msg_opt_flag = packet.ReadByte(); if (this.msg_opt_flag == 1) { this._msg_opt = new MsgTestPhp(packet); } this._msg_rep = new List<MsgTestPhp>(); ushort msg_rep_count = packet.ReadUshort(); for (ushort i = 0; i < msg_rep_count; i++) { this._msg_rep.Add(new MsgTestPhp(packet)); } }
public ReqTestPhp(Packet packet) { this._u64 = packet.ReadUlong(); this._strxx = packet.ReadString(); this._msg_req = new MsgTestPhp(packet); this.msg_opt_flag = packet.ReadByte(); if (this.msg_opt_flag == 1) { this._msg_opt = new MsgTestPhp(packet); } this._msg_rep = new List <MsgTestPhp>(); ushort msg_rep_count = packet.ReadUshort(); for (ushort i = 0; i < msg_rep_count; i++) { this._msg_rep.Add(new MsgTestPhp(packet)); } }
public Packet Encode() { Packet packet = new Packet(); packet.WriteUlong(this._u64); packet.WriteString(this._strxx); packet.WriteBuffer(this._msg_req.GetBuffer()); packet.WriteByte(msg_opt_flag); if (this.msg_opt_flag == 1) { packet.WriteBuffer(this._msg_opt.GetBuffer()); } ushort msg_rep_count = (ushort)this._msg_rep.Count; packet.WriteUshort(msg_rep_count); for (ushort i = 0; i < msg_rep_count; i++) { MsgTestPhp xxx = this._msg_rep[i]; packet.WriteBuffer(xxx.GetBuffer()); } packet.Encode(Msg.P_ACK_TEST_PHP_OK); return(packet); }