def register_rpc_functions(session): def str_mul(a, b): return a * b searpc_server.create_service(RPC_SERVICE_NAME) searpc_server.register_function(RPC_SERVICE_NAME, str_mul) session.register_service(RPC_SERVICE_NAME, "basic", RpcServerProc)
def register_rpc_functions(session): def str_mul(a, b): return a * b searpc_server.create_service(RPC_SERVICE_NAME) searpc_server.register_function(RPC_SERVICE_NAME, str_mul) session.register_service(RPC_SERVICE_NAME, 'basic', RpcServerProc)
def register_rpc(self, ccnet_client): '''Register office rpc service''' searpc_server.create_service(OFFICE_RPC_SERVICE_NAME) ccnet_client.register_service(OFFICE_RPC_SERVICE_NAME, 'basic', RpcServerProc) searpc_server.register_function(OFFICE_RPC_SERVICE_NAME, self.query_convert_status) searpc_server.register_function(OFFICE_RPC_SERVICE_NAME, self.add_task)
def register_rpc_functions(session): def str_mul(a, b): global i i = i + 1 print '[%s] a = %s, b = %s' % (i, a, b) return a * b searpc_server.create_service(RPC_SERVICE_NAME) searpc_server.register_function(RPC_SERVICE_NAME, str_mul) session.register_service(RPC_SERVICE_NAME, 'basic', RpcServerProc)
def init_server(): searpc_server.create_service(SVCNAME) searpc_server.register_function(SVCNAME, add, 'add') searpc_server.register_function(SVCNAME, mul, 'multi') searpc_server.register_function(SVCNAME, json_func, 'json_func') searpc_server.register_function(SVCNAME, get_str, 'get_str')
def init_server(): searpc_server.create_service(SVCNAME) searpc_server.register_function(SVCNAME, add, 'add') searpc_server.register_function(SVCNAME, mul, 'multi') searpc_server.register_function(SVCNAME, json_func, 'json_func')