You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const Server_1 = require("../src/Server");
  4. //@ts-ignore
  5. const Client_1 = require("../src/Client");
  6. new Server_1.Server(20000, [{
  7. name: "HelloWorldRPCGroup",
  8. exportPublicRPCs: () => [],
  9. exportRPCs: () => [{
  10. type: 'call',
  11. name: 'echo',
  12. func: async (s) => s,
  13. }],
  14. }]);
  15. <<<<<<< HEAD
  16. const caller = new Client_1.Client(20000, 'localhost');
  17. =======
  18. const caller = new RPCSocket_1.RPCSocket(20000, 'localhost');
  19. >>>>>>> 17dc58c5b3fd3c76113d592d895400498578affa
  20. caller.connect().then(_ => {
  21. caller.info().then(console.log);
  22. caller["HelloWorldRPCGroup"].echo("x").then(console.log);
  23. });