Compare commits

..

No commits in common. "master" and "v1.01" have entirely different histories.

8 changed files with 0 additions and 49 deletions

View File

@ -1,15 +0,0 @@
//login 远程rpc_server
[err, h] := rpc_login("127.0.0.1:1234", "test", "password-token");
if err then
return echo "login fail:", err;
for i:=0 to 99 do Begin
echo "remote call demo_function1: ", i, "\n";
rpc_exec(h, 30*1000, "demo_function1", "hello: " $ datetimetostr(now()));//远程执行模型
End;
for i:=0 to 99 do Begin
echo "remote call demo_function2: ", i, "\n";
rpc_exec(h, 30*1000, "demo_function2", "world: " $ datetimetostr(now()));//远程执行模型
End;

View File

@ -1,5 +0,0 @@
rpc_register_func("demo_function1", "demo_function2");//注册server端函数列表
echo "Listen: 1234\n";
rpc_server("0.0.0.0:1234", 5, "password-token");//启动rpc_server服务等待进程结束

View File

@ -1,21 +0,0 @@
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...);

View File

@ -1,4 +0,0 @@
Function demo_function1(msg);
Begin
echo "demo_function1:", msg, "\n";
End;

View File

@ -1,4 +0,0 @@
Function demo_function2(msg);
Begin
echo "demo_function2:", msg, "\n";
End;

Binary file not shown.

BIN
rpc_plugin.dll Normal file

Binary file not shown.

Binary file not shown.