socket-function 1.1.13 → 1.1.14
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/SocketFunction.d.ts +1 -0
- package/SocketFunction.ts +5 -1
- package/index.d.ts +1 -0
- package/package.json +1 -1
package/SocketFunction.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare class SocketFunction {
|
|
|
26
26
|
static COEP: string;
|
|
27
27
|
static COOP: string;
|
|
28
28
|
static TOTAL_CALLS: number;
|
|
29
|
+
static registerOwnReconnectionUrl(url: string): void;
|
|
29
30
|
static readonly WIRE_SERIALIZER: {
|
|
30
31
|
serialize: (obj: unknown) => MaybePromise<Buffer[]>;
|
|
31
32
|
deserialize: (buffers: Buffer[]) => MaybePromise<unknown>;
|
package/SocketFunction.ts
CHANGED
|
@@ -16,7 +16,7 @@ import "./SetProcessVariables";
|
|
|
16
16
|
import cborx from "cbor-x";
|
|
17
17
|
import { setFlag } from "./require/compileFlags";
|
|
18
18
|
import { isNode } from "./src/misc";
|
|
19
|
-
import { getPendingCallCount, harvestCallTimes, harvestFailedCallCount } from "./src/CallFactory";
|
|
19
|
+
import { getPendingCallCount, harvestCallTimes, harvestFailedCallCount, registerOwnReconnectionUrl } from "./src/CallFactory";
|
|
20
20
|
import { measureWrap } from "./src/profiling/measure";
|
|
21
21
|
|
|
22
22
|
setFlag(require, "cbor-x", "allowclient", true);
|
|
@@ -71,6 +71,10 @@ export class SocketFunction {
|
|
|
71
71
|
|
|
72
72
|
public static TOTAL_CALLS = 0;
|
|
73
73
|
|
|
74
|
+
public static registerOwnReconnectionUrl(url: string) {
|
|
75
|
+
registerOwnReconnectionUrl(url);
|
|
76
|
+
}
|
|
77
|
+
|
|
74
78
|
// In retrospect... dynamically changing the wire serializer is a BAD idea. If any calls happen
|
|
75
79
|
// before it is changed, things just break. Also, it needs to be changed on both sides,
|
|
76
80
|
// or else things break. Also, it is very hard to detect when the issue is different serializers
|
package/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ declare module "socket-function/SocketFunction" {
|
|
|
35
35
|
static COEP: string;
|
|
36
36
|
static COOP: string;
|
|
37
37
|
static TOTAL_CALLS: number;
|
|
38
|
+
static registerOwnReconnectionUrl(url: string): void;
|
|
38
39
|
static readonly WIRE_SERIALIZER: {
|
|
39
40
|
serialize: (obj: unknown) => MaybePromise<Buffer[]>;
|
|
40
41
|
deserialize: (buffers: Buffer[]) => MaybePromise<unknown>;
|