Browse Source

naming

master
Daniel Hübleitner 5 years ago
parent
commit
2f32d7c9cd
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      src/backend/RPCSocketServer.ts

+ 6
- 6
src/backend/RPCSocketServer.ts View File

224
                 socket.on('error', this.conf.errorHandler(socket))
224
                 socket.on('error', this.conf.errorHandler(socket))
225
                 socket.on('close', this.conf.closeHandler(socket))
225
                 socket.on('close', this.conf.closeHandler(socket))
226
                 if(this.visibility === "127.0.0.1")
226
                 if(this.visibility === "127.0.0.1")
227
-                    this.initApis(socket)
227
+                    this.initRPCs(socket)
228
                 else
228
                 else
229
-                    this.initPublicApis(socket)
229
+                    this.initPublicRPCs(socket)
230
             })
230
             })
231
             this.wsServer.listen(this.port, this.visibility)
231
             this.wsServer.listen(this.port, this.visibility)
232
         }catch(e){
232
         }catch(e){
235
         }
235
         }
236
     }
236
     }
237
 
237
 
238
-    protected initApis(socket:Socket){
239
-        const adminRPCs:socketioRPC[] = [
238
+    protected initRPCs(socket:Socket){
239
+        const infoRPC:socketioRPC[] = [
240
             {
240
             {
241
                 name: 'info',
241
                 name: 'info',
242
                 type: 'call',
242
                 type: 'call',
245
         ]
245
         ]
246
 
246
 
247
         const rpcInfos:ExtendedRpcInfo[] = [
247
         const rpcInfos:ExtendedRpcInfo[] = [
248
-            ...rpcHooker(socket, "Admin", adminRPCs, false),
248
+            ...rpcHooker(socket, "RPC", infoRPC, false),
249
             ...this.rpcExporters.flatMap(exporter => rpcHooker(socket, exporter.name, [...exporter.exportPublicRPCs(), ...exporter.exportRPCs()]))
249
             ...this.rpcExporters.flatMap(exporter => rpcHooker(socket, exporter.name, [...exporter.exportPublicRPCs(), ...exporter.exportRPCs()]))
250
         ]
250
         ]
251
     }
251
     }
252
 
252
 
253
-    protected initPublicApis(socket:Socket){
253
+    protected initPublicRPCs(socket:Socket){
254
         const adminRPCs:socketioRPC[] = [
254
         const adminRPCs:socketioRPC[] = [
255
             {
255
             {
256
                 name: 'info',
256
                 name: 'info',

Loading…
Cancel
Save