Esempio n. 1
0
 public void SendMessage(RqId requestId, IRequest request)
 {
     if (null == mConnection)
     {
         Logger.LogError("当前没有连接,无法发送消息 " + requestId.ToString());
         return;
     }
     mConnection.SendMessage(requestId, request);
 }
Esempio n. 2
0
        public static void RegisterHandlerFunc(RqId requestId, System.Action <MyPeer, OperationRequest> invokeFunc)
        {
            byte rqIdByte = (byte)requestId;

            if (mPeerHandlerDic.ContainsKey(rqIdByte))
            {
                LBLogger.Error(LogTag, "注册重复的事件处理 " + requestId.ToString());
                return;
            }
            mPeerHandlerDic[rqIdByte] = invokeFunc;
        }
Esempio n. 3
0
 public void SendMessage(RqId requestId, IRequest request)
 {
     mPeer.OpCustom((byte)requestId, request.Serialization(), true);
 }