1.0.12 • Published 10 months ago
@ezgame/rpc v1.0.12
EasyGame rpc module
overview
this module is ezgame rpc module
install
npm i @ezgame/rpc
usage
import { TCPCommunicator } from "@ezgame/rpc"
import * as Log from "@ezgame/log"
import * as protocol from './protocol'
const Tag = "TEST"
async function run(){
try{
var comm = new TCPCommunicator();
var proxy = await comm.connect("localhost", 7001, protocol.TestProxy);
var r = await proxy.test("aaa", 111);
Log.debug(Tag, "test result: ", r);
}
catch(e){
Log.error(Tag, "error: ", e);
}
}
run();