void BeforeSendHook(NetProto.Api.ENetMsgId msgId, byte[] data) { Debug.Log("SEND " + msgId); // 发出一条消息后重置心跳时间 heartbeatCount = 0; }
void AfterRecvHook(NetProto.Api.ENetMsgId msgId) { Debug.Log("RECV " + msgId); }