Example #1
0
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)
Example #2
0
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)
Example #3
0
    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)
Example #4
0
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)
Example #5
0
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')
Example #6
0
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')