diff --git a/src/backend/RPCSocketServer.ts b/src/backend/RPCSocketServer.ts index b520813..92baadb 100644 --- a/src/backend/RPCSocketServer.ts +++ b/src/backend/RPCSocketServer.ts @@ -224,9 +224,9 @@ export class RPCSocketServer{ socket.on('error', this.conf.errorHandler(socket)) socket.on('close', this.conf.closeHandler(socket)) if(this.visibility === "127.0.0.1") - this.initApis(socket) + this.initRPCs(socket) else - this.initPublicApis(socket) + this.initPublicRPCs(socket) }) this.wsServer.listen(this.port, this.visibility) }catch(e){ @@ -235,8 +235,8 @@ export class RPCSocketServer{ } } - protected initApis(socket:Socket){ - const adminRPCs:socketioRPC[] = [ + protected initRPCs(socket:Socket){ + const infoRPC:socketioRPC[] = [ { name: 'info', type: 'call', @@ -245,12 +245,12 @@ export class RPCSocketServer{ ] const rpcInfos:ExtendedRpcInfo[] = [ - ...rpcHooker(socket, "Admin", adminRPCs, false), + ...rpcHooker(socket, "RPC", infoRPC, false), ...this.rpcExporters.flatMap(exporter => rpcHooker(socket, exporter.name, [...exporter.exportPublicRPCs(), ...exporter.exportRPCs()])) ] } - protected initPublicApis(socket:Socket){ + protected initPublicRPCs(socket:Socket){ const adminRPCs:socketioRPC[] = [ { name: 'info',