it werks
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { Server } from '../src/Backend'
|
||||
import { RPCServer } from '../src/Backend'
|
||||
|
||||
new Server(20000, [{
|
||||
new RPCServer(20000, [{
|
||||
name: "HelloWorldRPCGroup",
|
||||
publicRPCs: () => [],
|
||||
localRPCs: () => [{
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user