socket-function 1.1.14 → 1.1.15

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.
@@ -26,7 +26,6 @@ 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;
30
29
  static readonly WIRE_SERIALIZER: {
31
30
  serialize: (obj: unknown) => MaybePromise<Buffer[]>;
32
31
  deserialize: (buffers: Buffer[]) => MaybePromise<unknown>;
package/SocketFunction.ts CHANGED
@@ -71,10 +71,6 @@ 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
-
78
74
  // In retrospect... dynamically changing the wire serializer is a BAD idea. If any calls happen
79
75
  // before it is changed, things just break. Also, it needs to be changed on both sides,
80
76
  // or else things break. Also, it is very hard to detect when the issue is different serializers
package/index.d.ts CHANGED
@@ -35,7 +35,6 @@ 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;
39
38
  static readonly WIRE_SERIALIZER: {
40
39
  serialize: (obj: unknown) => MaybePromise<Buffer[]>;
41
40
  deserialize: (buffers: Buffer[]) => MaybePromise<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -5,7 +5,7 @@ import tls from "tls";
5
5
  import { getNodeIdsFromRequest, httpCallHandler } from "./callHTTPHandler";
6
6
  import { SocketFunction } from "../SocketFunction";
7
7
  import { getTrustedCertificates, watchTrustedCertificates } from "./certStore";
8
- import { createCallFactory } from "./CallFactory";
8
+ import { createCallFactory, registerOwnReconnectionUrl } from "./CallFactory";
9
9
  import { parseSNIExtension, parseTLSHello, SNIType } from "./tlsParsing";
10
10
  import debugbreak from "debugbreak";
11
11
  import { getNodeId } from "./nodeCache";
@@ -351,6 +351,7 @@ export async function startSocketServer(
351
351
 
352
352
  let nodeId = getNodeId(getCommonName(config.cert), port);
353
353
  console.log(green(`Started Listening on ${nodeId} (${host}) after ${formatTime(process.uptime() * 1000)}`));
354
+ registerOwnReconnectionUrl(nodeId);
354
355
 
355
356
  return nodeId;
356
357
  }