@ives_xxz/framework 2.3.2 → 2.3.3
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/package.json
CHANGED
|
@@ -81,6 +81,8 @@ export default class FWSocket extends FW.Service implements FW.Socket {
|
|
|
81
81
|
this.socket = new WebSocket(address);
|
|
82
82
|
} else {
|
|
83
83
|
if (config.certificate) {
|
|
84
|
+
this.certificate = config.certificate;
|
|
85
|
+
|
|
84
86
|
let url = config.certificate.nativeUrl;
|
|
85
87
|
if (cc.assetManager.cacheManager) {
|
|
86
88
|
url =
|
|
@@ -89,7 +91,6 @@ export default class FWSocket extends FW.Service implements FW.Socket {
|
|
|
89
91
|
url;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
FW.Log.debug("创建socket链接", address, url, JSON.stringify(config));
|
|
93
94
|
//@ts-ignore
|
|
94
95
|
this.socket = new WebSocket(address, [], url);
|
|
95
96
|
} else {
|
|
@@ -98,10 +99,7 @@ export default class FWSocket extends FW.Service implements FW.Socket {
|
|
|
98
99
|
}
|
|
99
100
|
this.socket.onopen = this.onSocketOpen.bind(this);
|
|
100
101
|
this.socket.onclose = this.onSocketClose.bind(this);
|
|
101
|
-
this.socket.onerror = (
|
|
102
|
-
FW.Log.error("触发error消息");
|
|
103
|
-
this.onSocketError(msg);
|
|
104
|
-
};
|
|
102
|
+
this.socket.onerror = this.onSocketError.bind(this);
|
|
105
103
|
this.socket.onmessage = this.onSocketMessage.bind(this);
|
|
106
104
|
|
|
107
105
|
this.socketSender = socketSender;
|