7 public bool doQuit
= false;
10 string
[] delegate () listEndpoints
;
14 rpcRegisterEndpoint
!getList(delegate (int id
, int di, string
ds) {
15 writeln("getList: id=", id
);
16 writeln("getList: di=", di);
17 writeln("getList: ds=", ds);
21 rpcRegisterEndpoint
!quit(() { doQuit
= true; });
23 //rpcRegisterEndpoint!listEndpoints;
24 rpcRegisterEndpoint
!listEndpoints(() { return rpcEndpointNames
; });
26 writeln(rpcEndpointNames
);
28 sk
.create("/k8/rpc-test");
29 writeln("waiting for client...");
30 auto cl
= sk
.accept();
31 writeln("client comes.");
33 auto cmd
= cl
.readNum
!ushort;
34 if (cmd
!= RPCommand
.Call
) throw new Exception("invalid command");