cgserver 6.9.460 → 6.9.462
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/Logic/EventTool.js +4 -0
- package/dist/lib/SocketServer/IRpc.js +1 -0
- package/dist/lib/SocketServer/IRpcClientWebSocket.js +11 -4
- package/dist/lib/SocketServer/IRpcServerWebSocket.js +11 -4
- package/dist/lib/ThirdParty/CgMq.js +1 -0
- package/dist/types/Logic/EventTool.d.ts +1 -0
- package/dist/types/SocketServer/IRpc.d.ts +1 -0
- package/dist/types/SocketServer/IRpcClientWebSocket.d.ts +2 -1
- package/dist/types/SocketServer/IRpcServerWebSocket.d.ts +2 -1
- package/package.json +1 -1
|
@@ -39,12 +39,19 @@ class IRpcClientWebSocket extends IClientWebSocket_1.IClientWebSocket {
|
|
|
39
39
|
super.send(msg);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
receive_other_all(
|
|
43
|
-
if (
|
|
44
|
-
EventTool_1.GEventTool.emit(
|
|
42
|
+
receive_other_all(msg) {
|
|
43
|
+
if (msg.__rpcid) {
|
|
44
|
+
EventTool_1.GEventTool.emit(msg.__rpcid, msg);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
Log_1.GLog.error({ des: "no handle",
|
|
47
|
+
Log_1.GLog.error({ des: "no handle", msg });
|
|
48
|
+
}
|
|
49
|
+
async _onMessage(msg) {
|
|
50
|
+
if (msg.__return) {
|
|
51
|
+
EventTool_1.GEventTool.emit(msg.__rpcid, msg);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
super._onMessage(msg);
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
exports.IRpcClientWebSocket = IRpcClientWebSocket;
|
|
@@ -39,12 +39,19 @@ class IRpcServerWebSocket extends IServerWebSocket_1.IServerWebSocket {
|
|
|
39
39
|
super.send(msg);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
receive_other_all(
|
|
43
|
-
if (
|
|
44
|
-
EventTool_1.GEventTool.emit(
|
|
42
|
+
receive_other_all(msg) {
|
|
43
|
+
if (msg.__return) {
|
|
44
|
+
EventTool_1.GEventTool.emit(msg.__rpcid, msg);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
Log_1.GLog.error({ des: "no handle",
|
|
47
|
+
Log_1.GLog.error({ des: "no handle", msg });
|
|
48
|
+
}
|
|
49
|
+
async _onMessage(msg) {
|
|
50
|
+
if (msg.__return) {
|
|
51
|
+
EventTool_1.GEventTool.emit(msg.__rpcid, msg);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
super._onMessage(msg);
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
exports.IRpcServerWebSocket = IRpcServerWebSocket;
|
|
@@ -7,6 +7,7 @@ declare class EventTool {
|
|
|
7
7
|
off(event: string, func: (...args: any[]) => void): void;
|
|
8
8
|
once(event: string, func: (...args: any[]) => void): void;
|
|
9
9
|
emit(event: string, ...args: any[]): void;
|
|
10
|
+
listenerCount(event: string): number;
|
|
10
11
|
}
|
|
11
12
|
export declare let GEventTool: EventTool;
|
|
12
13
|
export {};
|
|
@@ -7,5 +7,6 @@ export declare class IRpcClientWebSocket extends IClientWebSocket implements IRp
|
|
|
7
7
|
des: string;
|
|
8
8
|
}): any;
|
|
9
9
|
callRemote(msg: RpcBaseMsg): Promise<unknown>;
|
|
10
|
-
receive_other_all(
|
|
10
|
+
receive_other_all(msg: RpcBaseMsg): void;
|
|
11
|
+
protected _onMessage(msg: RpcBaseMsg): Promise<void>;
|
|
11
12
|
}
|
|
@@ -7,5 +7,6 @@ export declare class IRpcServerWebSocket extends IServerWebSocket implements IRp
|
|
|
7
7
|
des: string;
|
|
8
8
|
}): any;
|
|
9
9
|
callRemote(msg: RpcBaseMsg): Promise<unknown>;
|
|
10
|
-
receive_other_all(
|
|
10
|
+
receive_other_all(msg: RpcBaseMsg): void;
|
|
11
|
+
protected _onMessage(msg: RpcBaseMsg): Promise<void>;
|
|
11
12
|
}
|