rpc_plugin/demo
hans 0c4f816f73 上传文件至 demo 2025-07-30 15:46:33 +08:00
..
demo-client.tsl 上传文件至 demo 2025-07-30 15:46:33 +08:00
demo-server.tsl 上传文件至 demo 2025-07-30 15:46:33 +08:00
readme 上传文件至 demo 2025-07-30 15:46:33 +08:00

readme

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

rpc API

1、rpc_server 启动rpc服务
   rpc_server(host, threads-pool-count, password-token [,callbackfunc], [isjoin]);
   eg: rpc_server('0.0.0.0:1234', 5,, "password");
   
2、rpc_login clinet端登录rpc-server
   [err, handle] := rpc_login(host, uid, pwssword);
   err=0, 登录成功,返回登录句柄;
   err非0登录失败。

3、rpc_logout 登出
   rpc_logout(handle);

4、rpc_exec 远程执行server端模型
   [err, result] := rpc_server(handle, timeout, function_name, argv1, argv2...);
   err=0执行成功result为执行结果
   err非0执行失败result为错误原因。

5、rpc_register_func server端注册服务函数列表
   rpc_register_func(func1, func2, func3...);