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