This commit is contained in:
Daniel Hübleitner
2019-09-18 02:58:51 +02:00
parent 2f32d7c9cd
commit 76dee64a54
29 changed files with 567 additions and 596 deletions
+4 -4
View File
@@ -1,8 +1,8 @@
import { RPCSocketServer } from '../src/backend/RPCSocketServer'
import { Server } from '../src/Server'
//@ts-ignore
import {RPCSocket} from '../src/frontend/RPCSocket'
import {Client} from '../src/Client'
new RPCSocketServer(20000, [{
new Server(20000, [{
name: "HelloWorldRPCGroup",
exportPublicRPCs: () => [],
exportRPCs: () => [{
@@ -12,7 +12,7 @@ new RPCSocketServer(20000, [{
}],
}])
const caller = new RPCSocket(20000, 'localhost')
const caller = new Client(20000, 'localhost')
caller.connect().then(_ => {
caller.info().then(console.log)
caller["HelloWorldRPCGroup"].echo("x").then(console.log)