Exemplo n.º 1
0
        private void OnBindingRPCInvoke(RPCMessage msg, IPEndPoint target)
        {
            if (m_MapRPCBind.ContainsKey(msg.name))
            {
                Debuger.Log(LOG_TAG, "OnBindingRPCInvoke() RPC:{0}, Target:{1}", msg.name, target);

                RPCMethodHelper rpc = m_MapRPCBind[msg.name];


                try
                {
                    rpc.Invoke(msg.args, target);
                }
                catch (Exception e)
                {
                    Debuger.LogError(LOG_TAG, "OnBindingRPCInvoke() RPC<" + msg.name + ">响应出错:" + e.Message + "\n" + e.StackTrace + "\n");
                }
            }
            else
            {
                Debuger.LogError(LOG_TAG, "OnBindingRPCInvoke() 收到未知的RPC:{0}", msg.name);
            }
        }
Exemplo n.º 2
0
        private void OnBindingRPCInvoke(RPCMessage msg, IPEndPoint target)
        {
            if (m_MapRPCBind.ContainsKey(msg.name))
            {
                MyLogger.Log(LOG_TAG, "OnBindingRPCInvoke() RPC:{0}, Target:{1}", msg.name, target);

                RPCMethodHelper rpc = m_MapRPCBind[msg.name];


                try
                {
                    rpc.Invoke(msg.args, target);
                }
                catch (Exception e)
                {
                    MyLogger.LogError(LOG_TAG, "OnBindingRPCInvoke()", " RPC<" + msg.name + ">response error:" + e.Message + "\n" + e.StackTrace + "\n");
                }
            }
            else
            {
                MyLogger.LogError(LOG_TAG, "OnBindingRPCInvoke() Unkown RPC request:{0}", msg.name);
            }
        }