naming
This commit is contained in:
@@ -224,9 +224,9 @@ export class RPCSocketServer{
|
|||||||
socket.on('error', this.conf.errorHandler(socket))
|
socket.on('error', this.conf.errorHandler(socket))
|
||||||
socket.on('close', this.conf.closeHandler(socket))
|
socket.on('close', this.conf.closeHandler(socket))
|
||||||
if(this.visibility === "127.0.0.1")
|
if(this.visibility === "127.0.0.1")
|
||||||
this.initApis(socket)
|
this.initRPCs(socket)
|
||||||
else
|
else
|
||||||
this.initPublicApis(socket)
|
this.initPublicRPCs(socket)
|
||||||
})
|
})
|
||||||
this.wsServer.listen(this.port, this.visibility)
|
this.wsServer.listen(this.port, this.visibility)
|
||||||
}catch(e){
|
}catch(e){
|
||||||
@@ -235,8 +235,8 @@ export class RPCSocketServer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected initApis(socket:Socket){
|
protected initRPCs(socket:Socket){
|
||||||
const adminRPCs:socketioRPC[] = [
|
const infoRPC:socketioRPC[] = [
|
||||||
{
|
{
|
||||||
name: 'info',
|
name: 'info',
|
||||||
type: 'call',
|
type: 'call',
|
||||||
@@ -245,12 +245,12 @@ export class RPCSocketServer{
|
|||||||
]
|
]
|
||||||
|
|
||||||
const rpcInfos:ExtendedRpcInfo[] = [
|
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()]))
|
...this.rpcExporters.flatMap(exporter => rpcHooker(socket, exporter.name, [...exporter.exportPublicRPCs(), ...exporter.exportRPCs()]))
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
protected initPublicApis(socket:Socket){
|
protected initPublicRPCs(socket:Socket){
|
||||||
const adminRPCs:socketioRPC[] = [
|
const adminRPCs:socketioRPC[] = [
|
||||||
{
|
{
|
||||||
name: 'info',
|
name: 'info',
|
||||||
|
|||||||
Reference in New Issue
Block a user