This commit is contained in:
Daniel Hübleitner
2019-09-20 22:39:07 +02:00
parent 968885767a
commit db9449aa2d
7 changed files with 31 additions and 37 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { Server } from '../src/Backend'
import { RPCServer } from '../src/Backend'
new Server(20000, [{
new RPCServer(20000, [{
name: "HelloWorldRPCGroup",
publicRPCs: () => [],
localRPCs: () => [{
+5 -5
View File
@@ -1,7 +1,7 @@
import { Client } from '../src/Frontend'
import { RPCSocket } from '../src/Frontend'
const client = new Client(20000, 'localhost')
client.connect().then(_ => {
client.info().then(console.log)
client["HelloWorldRPCGroup"].echo("x").then(console.log)
const socket = new RPCSocket(20000, 'localhost')
socket.connect().then(_ => {
socket.info().then(console.log)
socket["HelloWorldRPCGroup"].echo("x").then(console.log)
})