public static ProtocalManager Instance() { if (_instance == null) { _instance = new ProtocalManager(); } return(_instance); }
/// <summary> /// 通知服务器 发送心跳 /// </summary> private void NotifyServerEmptyHeartBeat() { ProtocalManager.Instance().SendCSEmptyHeartBeat(new CSEmptyHeartBeat(), (SCEmtpyHeartBeat sCEmtpyHeartBeat) => { Debug.Log("通知服务器 发送心跳成功!"); }, (ErrorInfo er) => { //默认心跳不可能失败 Debug.Log("通知服务器 发送心跳失败!Error:" + er.ErrorMessage); }); }