瀏覽代碼

naming

master
Daniel Hübleitner 5 年之前
父節點
當前提交
2f32d7c9cd
共有 1 個檔案被更改,包括 6 行新增6 行删除
  1. 6
    6
      src/backend/RPCSocketServer.ts

+ 6
- 6
src/backend/RPCSocketServer.ts 查看文件

@@ -224,9 +224,9 @@ export class RPCSocketServer{
224 224
                 socket.on('error', this.conf.errorHandler(socket))
225 225
                 socket.on('close', this.conf.closeHandler(socket))
226 226
                 if(this.visibility === "127.0.0.1")
227
-                    this.initApis(socket)
227
+                    this.initRPCs(socket)
228 228
                 else
229
-                    this.initPublicApis(socket)
229
+                    this.initPublicRPCs(socket)
230 230
             })
231 231
             this.wsServer.listen(this.port, this.visibility)
232 232
         }catch(e){
@@ -235,8 +235,8 @@ export class RPCSocketServer{
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 241
                 name: 'info',
242 242
                 type: 'call',
@@ -245,12 +245,12 @@ export class RPCSocketServer{
245 245
         ]
246 246
 
247 247
         const rpcInfos:ExtendedRpcInfo[] = [
248
-            ...rpcHooker(socket, "Admin", adminRPCs, false),
248
+            ...rpcHooker(socket, "RPC", infoRPC, false),
249 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 254
         const adminRPCs:socketioRPC[] = [
255 255
             {
256 256
                 name: 'info',

Loading…
取消
儲存