naming
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user