コード例 #1
0
        public void dispatchMsg(RpcMessage m)
        {
            RpcServantDelegate dg = null;

            if ((m.calltype & RpcMessage.CALL) != 0)
            {
                lock (_servants) {
                    if (!_servants.ContainsKey(m.ifidx))
                    {
                        doError(RpcException.RPCERROR_INTERFACE_NOTFOUND, m);
                        return;
                    }
                    dg = _servants[m.ifidx];
                }
                try {
                    RpcMessage msgreturn = dg.invoke(m);
                    if (msgreturn != null)
                    {
                        m.conn.sendMessage(msgreturn);
                    }
                }
                catch (Exception e) {
                    RpcCommunicator.instance().logger.error(" execute servant failed:" + e.ToString());
                    doError(RpcException.RPCERROR_REMOTEMETHOD_EXCEPTION, m);
                }
            }
        }
コード例 #2
0
        public void dispatchMsg(RpcMessage m)
        {
            RpcServantDelegate dg = null;

            if ((m.calltype & RpcMessage.CALL) != 0)
            {
                lock (_servants) {
                    if (!_servants.ContainsKey(m.ifidx))
                    {
                        doError(RpcException.RPCERROR_INTERFACE_NOTFOUND, m);
                        return;
                    }
                    dg = _servants[m.ifidx];
                }
                dg.invoke(m);
            }
        }