void Recv_ReliableAck_Ntf(Msg_ReliableAck_Ntf ntf) { try { RemoveSentPacket(ntf.recv_seq); } catch (System.Exception e) { Debug.LogError(e.ToString()); } }
private void Send_ReliableAck_Ntf(uint msgSEQ) { Reconnect(); Msg_ReliableAck_Ntf ntf = new Msg_ReliableAck_Ntf(); ntf.ack_seq = msgSEQ; string json = JsonUtility.ToJson(ntf); byte[] data = System.Text.Encoding.UTF8.GetBytes(json); Gamnet.Packet packet = new Gamnet.Packet(); packet.length = (ushort)(Packet.HEADER_SIZE + data.Length); packet.msg_seq = ++_send_seq; packet.msg_id = MsgID_CliSvr_ReliableAck_Ntf; packet.reliable = false; packet.Append(data); SendMsg(packet); }