mezon-js-protobuf 1.6.1 → 1.6.2
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.
|
@@ -35,7 +35,7 @@ export interface WebSocketAdapter {
|
|
|
35
35
|
onOpen: SocketOpenHandler | null;
|
|
36
36
|
isOpen(): boolean;
|
|
37
37
|
close(): void;
|
|
38
|
-
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, signal?: AbortSignal): void;
|
|
38
|
+
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, platform: string, signal?: AbortSignal): void;
|
|
39
39
|
send(message: any): void;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -77,7 +77,7 @@ export declare class WebSocketAdapterText implements WebSocketAdapter {
|
|
|
77
77
|
get onOpen(): SocketOpenHandler | null;
|
|
78
78
|
set onOpen(value: SocketOpenHandler | null);
|
|
79
79
|
isOpen(): boolean;
|
|
80
|
-
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, signal?: AbortSignal): void;
|
|
80
|
+
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, platform: string, signal?: AbortSignal): void;
|
|
81
81
|
close(): void;
|
|
82
82
|
send(msg: any): void;
|
|
83
83
|
}
|
|
@@ -30,6 +30,6 @@ export declare class WebSocketAdapterPb implements WebSocketAdapter {
|
|
|
30
30
|
set onOpen(value: SocketOpenHandler | null);
|
|
31
31
|
isOpen(): boolean;
|
|
32
32
|
close(): void;
|
|
33
|
-
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, signal?: AbortSignal): void;
|
|
33
|
+
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, platform: string, signal?: AbortSignal): void;
|
|
34
34
|
send(msg: any): void;
|
|
35
35
|
}
|
|
@@ -11885,13 +11885,13 @@ var WebSocketAdapterPb = class {
|
|
|
11885
11885
|
(_a = this._socket) == null ? void 0 : _a.close();
|
|
11886
11886
|
this._socket = void 0;
|
|
11887
11887
|
}
|
|
11888
|
-
connect(scheme, host, port, createStatus, token, signal) {
|
|
11888
|
+
connect(scheme, host, port, createStatus, token, platform, signal) {
|
|
11889
11889
|
if (signal) {
|
|
11890
11890
|
signal.addEventListener("abort", () => {
|
|
11891
11891
|
this.close();
|
|
11892
11892
|
});
|
|
11893
11893
|
}
|
|
11894
|
-
const url = `${scheme}${host}:${port}/ws?lang=en&status=${encodeURIComponent(createStatus.toString())}&token=${encodeURIComponent(token)}&format=protobuf`;
|
|
11894
|
+
const url = `${scheme}${host}:${port}/ws?lang=en&status=${encodeURIComponent(createStatus.toString())}&token=${encodeURIComponent(token)}&format=protobuf&platform=${encodeURIComponent(platform)}`;
|
|
11895
11895
|
this._socket = new WebSocket(url);
|
|
11896
11896
|
this._socket.binaryType = "arraybuffer";
|
|
11897
11897
|
}
|
|
@@ -11872,13 +11872,13 @@ var WebSocketAdapterPb = class {
|
|
|
11872
11872
|
(_a = this._socket) == null ? void 0 : _a.close();
|
|
11873
11873
|
this._socket = void 0;
|
|
11874
11874
|
}
|
|
11875
|
-
connect(scheme, host, port, createStatus, token, signal) {
|
|
11875
|
+
connect(scheme, host, port, createStatus, token, platform, signal) {
|
|
11876
11876
|
if (signal) {
|
|
11877
11877
|
signal.addEventListener("abort", () => {
|
|
11878
11878
|
this.close();
|
|
11879
11879
|
});
|
|
11880
11880
|
}
|
|
11881
|
-
const url = `${scheme}${host}:${port}/ws?lang=en&status=${encodeURIComponent(createStatus.toString())}&token=${encodeURIComponent(token)}&format=protobuf`;
|
|
11881
|
+
const url = `${scheme}${host}:${port}/ws?lang=en&status=${encodeURIComponent(createStatus.toString())}&token=${encodeURIComponent(token)}&format=protobuf&platform=${encodeURIComponent(platform)}`;
|
|
11882
11882
|
this._socket = new WebSocket(url);
|
|
11883
11883
|
this._socket.binaryType = "arraybuffer";
|
|
11884
11884
|
}
|
package/package.json
CHANGED
package/web_socket_adapter_pb.ts
CHANGED
|
@@ -87,13 +87,13 @@ export class WebSocketAdapterPb implements WebSocketAdapter {
|
|
|
87
87
|
this._socket = undefined;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, signal?: AbortSignal): void {
|
|
90
|
+
connect(scheme: string, host: string, port: string, createStatus: boolean, token: string, platform: string, signal?: AbortSignal): void {
|
|
91
91
|
if (signal) {
|
|
92
92
|
signal.addEventListener('abort', () => {
|
|
93
93
|
this.close();
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
const url = `${scheme}${host}:${port}/ws?lang=en&status=${encodeURIComponent(createStatus.toString())}&token=${encodeURIComponent(token)}&format=protobuf`;
|
|
96
|
+
const url = `${scheme}${host}:${port}/ws?lang=en&status=${encodeURIComponent(createStatus.toString())}&token=${encodeURIComponent(token)}&format=protobuf&platform=${encodeURIComponent(platform)}`;
|
|
97
97
|
this._socket = new WebSocket(url);
|
|
98
98
|
this._socket.binaryType = "arraybuffer";
|
|
99
99
|
}
|