@dxos/network-manager 0.3.9-main.6370198 → 0.3.9-main.71124bf
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/browser/{chunk-4HITD6WI.mjs → chunk-XF474R3E.mjs} +384 -108
- package/dist/lib/browser/chunk-XF474R3E.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -11
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +3 -3
- package/dist/lib/node/{chunk-6AD7QA4X.cjs → chunk-Y2B5BDRH.cjs} +383 -103
- package/dist/lib/node/chunk-Y2B5BDRH.cjs.map +7 -0
- package/dist/lib/node/index.cjs +27 -36
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +18 -19
- package/dist/lib/node/testing/index.cjs.map +1 -1
- package/dist/types/src/connection-log.d.ts.map +1 -1
- package/dist/types/src/swarm/connection.d.ts +4 -1
- package/dist/types/src/swarm/connection.d.ts.map +1 -1
- package/dist/types/src/topology/mmst-topology.d.ts +1 -0
- package/dist/types/src/topology/mmst-topology.d.ts.map +1 -1
- package/dist/types/src/transport/index.d.ts +0 -1
- package/dist/types/src/transport/index.d.ts.map +1 -1
- package/dist/types/src/transport/libdatachannel-transport.d.ts +4 -1
- package/dist/types/src/transport/libdatachannel-transport.d.ts.map +1 -1
- package/dist/types/src/transport/memory-transport.d.ts +3 -1
- package/dist/types/src/transport/memory-transport.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport-proxy.d.ts +3 -1
- package/dist/types/src/transport/simplepeer-transport-proxy.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport-service.d.ts +3 -1
- package/dist/types/src/transport/simplepeer-transport-service.d.ts.map +1 -1
- package/dist/types/src/transport/simplepeer-transport.d.ts +7 -1
- package/dist/types/src/transport/simplepeer-transport.d.ts.map +1 -1
- package/dist/types/src/transport/tcp-transport.browser.d.ts +3 -1
- package/dist/types/src/transport/tcp-transport.browser.d.ts.map +1 -1
- package/dist/types/src/transport/tcp-transport.d.ts +3 -1
- package/dist/types/src/transport/tcp-transport.d.ts.map +1 -1
- package/dist/types/src/transport/transport.d.ts +17 -0
- package/dist/types/src/transport/transport.d.ts.map +1 -1
- package/dist/types/src/wire-protocol.d.ts +1 -1
- package/dist/types/src/wire-protocol.d.ts.map +1 -1
- package/package.json +18 -18
- package/src/connection-log.ts +14 -1
- package/src/swarm/connection.ts +23 -4
- package/src/topology/mmst-topology.ts +34 -6
- package/src/transport/index.ts +0 -1
- package/src/transport/libdatachannel-transport.test.ts +0 -4
- package/src/transport/libdatachannel-transport.ts +83 -5
- package/src/transport/memory-transport.ts +14 -1
- package/src/transport/simplepeer-transport-proxy.ts +9 -1
- package/src/transport/simplepeer-transport-service.ts +14 -0
- package/src/transport/simplepeer-transport.ts +66 -3
- package/src/transport/tcp-transport.browser.ts +9 -1
- package/src/transport/tcp-transport.ts +19 -1
- package/src/transport/transport.ts +19 -0
- package/src/wire-protocol.ts +3 -3
- package/dist/lib/browser/chunk-4HITD6WI.mjs.map +0 -7
- package/dist/lib/browser/chunk-YERMWDRB.mjs +0 -24
- package/dist/lib/browser/chunk-YERMWDRB.mjs.map +0 -7
- package/dist/lib/browser/index.browser-O53CPVK3.mjs +0 -14
- package/dist/lib/browser/index.browser-O53CPVK3.mjs.map +0 -7
- package/dist/lib/node/chunk-6AD7QA4X.cjs.map +0 -7
- package/dist/lib/node/chunk-XE5JOIGD.cjs +0 -462
- package/dist/lib/node/chunk-XE5JOIGD.cjs.map +0 -7
- package/dist/lib/node/datachannel-53JZPGFA.cjs +0 -35
- package/dist/lib/node/datachannel-53JZPGFA.cjs.map +0 -7
- package/dist/types/src/transport/datachannel/index.browser.d.ts +0 -15
- package/dist/types/src/transport/datachannel/index.browser.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/index.d.ts +0 -8
- package/dist/types/src/transport/datachannel/index.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-data-channel.d.ts +0 -29
- package/dist/types/src/transport/datachannel/rtc-data-channel.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-events.d.ts +0 -9
- package/dist/types/src/transport/datachannel/rtc-events.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-ice-candidate.d.ts +0 -22
- package/dist/types/src/transport/datachannel/rtc-ice-candidate.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-peer-connection.d.ts +0 -47
- package/dist/types/src/transport/datachannel/rtc-peer-connection.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-peer-connection.test.d.ts +0 -2
- package/dist/types/src/transport/datachannel/rtc-peer-connection.test.d.ts.map +0 -1
- package/dist/types/src/transport/datachannel/rtc-session-description.d.ts +0 -10
- package/dist/types/src/transport/datachannel/rtc-session-description.d.ts.map +0 -1
- package/src/transport/datachannel/README.md +0 -2
- package/src/transport/datachannel/index.browser.ts +0 -8
- package/src/transport/datachannel/index.ts +0 -17
- package/src/transport/datachannel/rtc-data-channel.ts +0 -148
- package/src/transport/datachannel/rtc-events.ts +0 -23
- package/src/transport/datachannel/rtc-ice-candidate.ts +0 -54
- package/src/transport/datachannel/rtc-peer-connection.test.ts +0 -112
- package/src/transport/datachannel/rtc-peer-connection.ts +0 -347
- package/src/transport/datachannel/rtc-session-description.ts +0 -23
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import "@dxos/node-std/globals";
|
|
2
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
|
+
}) : x)(function(x) {
|
|
5
|
+
if (typeof require !== "undefined")
|
|
6
|
+
return require.apply(this, arguments);
|
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// inject-globals:@inject-globals
|
|
2
11
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
12
|
+
global,
|
|
13
|
+
Buffer as Buffer2,
|
|
14
|
+
process
|
|
15
|
+
} from "@dxos/node-std/inject-globals";
|
|
5
16
|
|
|
6
17
|
// packages/core/mesh/network-manager/src/swarm/connection.ts
|
|
7
|
-
import { DeferredTask, Event, sleep, scheduleTask, synchronized } from "@dxos/async";
|
|
18
|
+
import { DeferredTask, Event, sleep, scheduleTask, scheduleTaskInterval, synchronized } from "@dxos/async";
|
|
8
19
|
import { Context, cancelWithContext } from "@dxos/context";
|
|
9
20
|
import { ErrorStream } from "@dxos/debug";
|
|
10
21
|
import { invariant } from "@dxos/invariant";
|
|
11
22
|
import { PublicKey } from "@dxos/keys";
|
|
12
|
-
import { log } from "@dxos/log";
|
|
23
|
+
import { log, logInfo } from "@dxos/log";
|
|
13
24
|
import { CancelledError, ProtocolError, ConnectionResetError, ConnectivityError, TimeoutError, UnknownProtocolError, trace } from "@dxos/protocols";
|
|
14
25
|
function _ts_decorate(decorators, target, key, desc) {
|
|
15
26
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -24,6 +35,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
24
35
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/swarm/connection.ts";
|
|
25
36
|
var STARTING_SIGNALLING_DELAY = 10;
|
|
26
37
|
var TRANSPORT_CONNECTION_TIMEOUT = 1e4;
|
|
38
|
+
var TRANSPORT_STATS_INTERVAL = 5e3;
|
|
27
39
|
var MAX_SIGNALLING_DELAY = 300;
|
|
28
40
|
var ConnectionState;
|
|
29
41
|
(function(ConnectionState5) {
|
|
@@ -86,6 +98,7 @@ var Connection = class {
|
|
|
86
98
|
this.stateChanged = new Event();
|
|
87
99
|
this.errors = new ErrorStream();
|
|
88
100
|
this._instanceId = PublicKey.random().toHex();
|
|
101
|
+
this.transportStats = new Event();
|
|
89
102
|
this._signalSendTask = new DeferredTask(this._ctx, async () => {
|
|
90
103
|
await this._flushSignalBuffer();
|
|
91
104
|
});
|
|
@@ -98,11 +111,14 @@ var Connection = class {
|
|
|
98
111
|
initiator: this.initiator
|
|
99
112
|
}, {
|
|
100
113
|
F: __dxlog_file,
|
|
101
|
-
L:
|
|
114
|
+
L: 134,
|
|
102
115
|
S: this,
|
|
103
116
|
C: (f, a) => f(...a)
|
|
104
117
|
});
|
|
105
118
|
}
|
|
119
|
+
get sessionIdString() {
|
|
120
|
+
return this.sessionId.truncate();
|
|
121
|
+
}
|
|
106
122
|
get state() {
|
|
107
123
|
return this._state;
|
|
108
124
|
}
|
|
@@ -118,7 +134,7 @@ var Connection = class {
|
|
|
118
134
|
async openConnection() {
|
|
119
135
|
invariant(this._state === ConnectionState.INITIAL, "Invalid state.", {
|
|
120
136
|
F: __dxlog_file,
|
|
121
|
-
L:
|
|
137
|
+
L: 164,
|
|
122
138
|
S: this,
|
|
123
139
|
A: [
|
|
124
140
|
"this._state === ConnectionState.INITIAL",
|
|
@@ -129,7 +145,7 @@ var Connection = class {
|
|
|
129
145
|
id: this._instanceId
|
|
130
146
|
}), {
|
|
131
147
|
F: __dxlog_file,
|
|
132
|
-
L:
|
|
148
|
+
L: 165,
|
|
133
149
|
S: this,
|
|
134
150
|
C: (f, a) => f(...a)
|
|
135
151
|
});
|
|
@@ -141,18 +157,18 @@ var Connection = class {
|
|
|
141
157
|
initiator: this.initiator
|
|
142
158
|
}, {
|
|
143
159
|
F: __dxlog_file,
|
|
144
|
-
L:
|
|
160
|
+
L: 166,
|
|
145
161
|
S: this,
|
|
146
162
|
C: (f, a) => f(...a)
|
|
147
163
|
});
|
|
148
164
|
this._changeState(ConnectionState.CONNECTING);
|
|
149
|
-
this._protocol.open().catch((err) => {
|
|
165
|
+
this._protocol.open(this.sessionId).catch((err) => {
|
|
150
166
|
this.errors.raise(err);
|
|
151
167
|
});
|
|
152
168
|
this._protocol.stream.on("close", () => {
|
|
153
169
|
log("protocol stream closed", void 0, {
|
|
154
170
|
F: __dxlog_file,
|
|
155
|
-
L:
|
|
171
|
+
L: 183,
|
|
156
172
|
S: this,
|
|
157
173
|
C: (f, a) => f(...a)
|
|
158
174
|
});
|
|
@@ -161,7 +177,7 @@ var Connection = class {
|
|
|
161
177
|
scheduleTask(this.connectedTimeoutContext, async () => {
|
|
162
178
|
log.info(`timeout waiting ${TRANSPORT_CONNECTION_TIMEOUT / 1e3}s for transport to connect, aborting`, void 0, {
|
|
163
179
|
F: __dxlog_file,
|
|
164
|
-
L:
|
|
180
|
+
L: 190,
|
|
165
181
|
S: this,
|
|
166
182
|
C: (f, a) => f(...a)
|
|
167
183
|
});
|
|
@@ -169,7 +185,7 @@ var Connection = class {
|
|
|
169
185
|
}, TRANSPORT_CONNECTION_TIMEOUT);
|
|
170
186
|
invariant(!this._transport, void 0, {
|
|
171
187
|
F: __dxlog_file,
|
|
172
|
-
L:
|
|
188
|
+
L: 198,
|
|
173
189
|
S: this,
|
|
174
190
|
A: [
|
|
175
191
|
"!this._transport",
|
|
@@ -179,18 +195,20 @@ var Connection = class {
|
|
|
179
195
|
this._transport = this._transportFactory.createTransport({
|
|
180
196
|
initiator: this.initiator,
|
|
181
197
|
stream: this._protocol.stream,
|
|
182
|
-
sendSignal: async (signal) => this._sendSignal(signal)
|
|
198
|
+
sendSignal: async (signal) => this._sendSignal(signal),
|
|
199
|
+
sessionId: this.sessionId
|
|
183
200
|
});
|
|
184
201
|
this._transport.connected.once(async () => {
|
|
185
202
|
this._changeState(ConnectionState.CONNECTED);
|
|
186
203
|
await this.connectedTimeoutContext.dispose();
|
|
187
204
|
this._callbacks?.onConnected?.();
|
|
205
|
+
scheduleTaskInterval(this._ctx, async () => this._emitTransportStats(), TRANSPORT_STATS_INTERVAL);
|
|
188
206
|
});
|
|
189
207
|
this._transport.closed.once(() => {
|
|
190
208
|
this._transport = void 0;
|
|
191
209
|
log("abort triggered by transport close", void 0, {
|
|
192
210
|
F: __dxlog_file,
|
|
193
|
-
L:
|
|
211
|
+
L: 216,
|
|
194
212
|
S: this,
|
|
195
213
|
C: (f, a) => f(...a)
|
|
196
214
|
});
|
|
@@ -201,7 +219,7 @@ var Connection = class {
|
|
|
201
219
|
err
|
|
202
220
|
}, {
|
|
203
221
|
F: __dxlog_file,
|
|
204
|
-
L:
|
|
222
|
+
L: 221,
|
|
205
223
|
S: this,
|
|
206
224
|
C: (f, a) => f(...a)
|
|
207
225
|
});
|
|
@@ -211,7 +229,7 @@ var Connection = class {
|
|
|
211
229
|
if (err instanceof ConnectionResetError) {
|
|
212
230
|
log.info("aborting due to transport ConnectionResetError", void 0, {
|
|
213
231
|
F: __dxlog_file,
|
|
214
|
-
L:
|
|
232
|
+
L: 228,
|
|
215
233
|
S: this,
|
|
216
234
|
C: (f, a) => f(...a)
|
|
217
235
|
});
|
|
@@ -219,7 +237,7 @@ var Connection = class {
|
|
|
219
237
|
} else if (err instanceof ConnectivityError) {
|
|
220
238
|
log.info("aborting due to transport ConnectivityError", void 0, {
|
|
221
239
|
F: __dxlog_file,
|
|
222
|
-
L:
|
|
240
|
+
L: 231,
|
|
223
241
|
S: this,
|
|
224
242
|
C: (f, a) => f(...a)
|
|
225
243
|
});
|
|
@@ -229,7 +247,7 @@ var Connection = class {
|
|
|
229
247
|
err
|
|
230
248
|
}, {
|
|
231
249
|
F: __dxlog_file,
|
|
232
|
-
L:
|
|
250
|
+
L: 234,
|
|
233
251
|
S: this,
|
|
234
252
|
C: (f, a) => f(...a)
|
|
235
253
|
});
|
|
@@ -247,7 +265,7 @@ var Connection = class {
|
|
|
247
265
|
id: this._instanceId
|
|
248
266
|
}), {
|
|
249
267
|
F: __dxlog_file,
|
|
250
|
-
L:
|
|
268
|
+
L: 250,
|
|
251
269
|
S: this,
|
|
252
270
|
C: (f, a) => f(...a)
|
|
253
271
|
});
|
|
@@ -257,14 +275,14 @@ var Connection = class {
|
|
|
257
275
|
err
|
|
258
276
|
}, {
|
|
259
277
|
F: __dxlog_file,
|
|
260
|
-
L:
|
|
278
|
+
L: 257,
|
|
261
279
|
S: this,
|
|
262
280
|
C: (f, a) => f(...a)
|
|
263
281
|
});
|
|
264
282
|
if (this._state === ConnectionState.CLOSED || this._state === ConnectionState.ABORTED) {
|
|
265
283
|
log(`abort ignored: already ${this._state}`, this.closeReason, {
|
|
266
284
|
F: __dxlog_file,
|
|
267
|
-
L:
|
|
285
|
+
L: 259,
|
|
268
286
|
S: this,
|
|
269
287
|
C: (f, a) => f(...a)
|
|
270
288
|
});
|
|
@@ -279,7 +297,7 @@ var Connection = class {
|
|
|
279
297
|
try {
|
|
280
298
|
log("aborting protocol... ", void 0, {
|
|
281
299
|
F: __dxlog_file,
|
|
282
|
-
L:
|
|
300
|
+
L: 273,
|
|
283
301
|
S: this,
|
|
284
302
|
C: (f, a) => f(...a)
|
|
285
303
|
});
|
|
@@ -287,7 +305,7 @@ var Connection = class {
|
|
|
287
305
|
} catch (err2) {
|
|
288
306
|
log.catch(err2, void 0, {
|
|
289
307
|
F: __dxlog_file,
|
|
290
|
-
L:
|
|
308
|
+
L: 276,
|
|
291
309
|
S: this,
|
|
292
310
|
C: (f, a) => f(...a)
|
|
293
311
|
});
|
|
@@ -297,7 +315,7 @@ var Connection = class {
|
|
|
297
315
|
} catch (err2) {
|
|
298
316
|
log.catch(err2, void 0, {
|
|
299
317
|
F: __dxlog_file,
|
|
300
|
-
L:
|
|
318
|
+
L: 283,
|
|
301
319
|
S: this,
|
|
302
320
|
C: (f, a) => f(...a)
|
|
303
321
|
});
|
|
@@ -307,7 +325,7 @@ var Connection = class {
|
|
|
307
325
|
} catch (err2) {
|
|
308
326
|
log.catch(err2, void 0, {
|
|
309
327
|
F: __dxlog_file,
|
|
310
|
-
L:
|
|
328
|
+
L: 289,
|
|
311
329
|
S: this,
|
|
312
330
|
C: (f, a) => f(...a)
|
|
313
331
|
});
|
|
@@ -331,7 +349,7 @@ var Connection = class {
|
|
|
331
349
|
peerId: this.ownId
|
|
332
350
|
}, {
|
|
333
351
|
F: __dxlog_file,
|
|
334
|
-
L:
|
|
352
|
+
L: 314,
|
|
335
353
|
S: this,
|
|
336
354
|
C: (f, a) => f(...a)
|
|
337
355
|
});
|
|
@@ -341,7 +359,7 @@ var Connection = class {
|
|
|
341
359
|
} catch (err2) {
|
|
342
360
|
log.catch(err2, void 0, {
|
|
343
361
|
F: __dxlog_file,
|
|
344
|
-
L:
|
|
362
|
+
L: 321,
|
|
345
363
|
S: this,
|
|
346
364
|
C: (f, a) => f(...a)
|
|
347
365
|
});
|
|
@@ -351,7 +369,7 @@ var Connection = class {
|
|
|
351
369
|
} catch (err2) {
|
|
352
370
|
log.catch(err2, void 0, {
|
|
353
371
|
F: __dxlog_file,
|
|
354
|
-
L:
|
|
372
|
+
L: 328,
|
|
355
373
|
S: this,
|
|
356
374
|
C: (f, a) => f(...a)
|
|
357
375
|
});
|
|
@@ -359,7 +377,7 @@ var Connection = class {
|
|
|
359
377
|
} else {
|
|
360
378
|
log.info(`graceful close requested when we were in ${lastState} state? aborting`, void 0, {
|
|
361
379
|
F: __dxlog_file,
|
|
362
|
-
L:
|
|
380
|
+
L: 331,
|
|
363
381
|
S: this,
|
|
364
382
|
C: (f, a) => f(...a)
|
|
365
383
|
});
|
|
@@ -368,7 +386,7 @@ var Connection = class {
|
|
|
368
386
|
} catch (err2) {
|
|
369
387
|
log.catch(err2, void 0, {
|
|
370
388
|
F: __dxlog_file,
|
|
371
|
-
L:
|
|
389
|
+
L: 335,
|
|
372
390
|
S: this,
|
|
373
391
|
C: (f, a) => f(...a)
|
|
374
392
|
});
|
|
@@ -378,7 +396,7 @@ var Connection = class {
|
|
|
378
396
|
} catch (err2) {
|
|
379
397
|
log.catch(err2, void 0, {
|
|
380
398
|
F: __dxlog_file,
|
|
381
|
-
L:
|
|
399
|
+
L: 340,
|
|
382
400
|
S: this,
|
|
383
401
|
C: (f, a) => f(...a)
|
|
384
402
|
});
|
|
@@ -388,7 +406,7 @@ var Connection = class {
|
|
|
388
406
|
peerId: this.ownId
|
|
389
407
|
}, {
|
|
390
408
|
F: __dxlog_file,
|
|
391
|
-
L:
|
|
409
|
+
L: 344,
|
|
392
410
|
S: this,
|
|
393
411
|
C: (f, a) => f(...a)
|
|
394
412
|
});
|
|
@@ -431,7 +449,7 @@ var Connection = class {
|
|
|
431
449
|
err
|
|
432
450
|
}, {
|
|
433
451
|
F: __dxlog_file,
|
|
434
|
-
L:
|
|
452
|
+
L: 382,
|
|
435
453
|
S: this,
|
|
436
454
|
C: (f, a) => f(...a)
|
|
437
455
|
});
|
|
@@ -444,7 +462,7 @@ var Connection = class {
|
|
|
444
462
|
async signal(msg) {
|
|
445
463
|
invariant(msg.sessionId, void 0, {
|
|
446
464
|
F: __dxlog_file,
|
|
447
|
-
L:
|
|
465
|
+
L: 391,
|
|
448
466
|
S: this,
|
|
449
467
|
A: [
|
|
450
468
|
"msg.sessionId",
|
|
@@ -454,7 +472,7 @@ var Connection = class {
|
|
|
454
472
|
if (!msg.sessionId.equals(this.sessionId)) {
|
|
455
473
|
log("dropping signal for incorrect session id", void 0, {
|
|
456
474
|
F: __dxlog_file,
|
|
457
|
-
L:
|
|
475
|
+
L: 393,
|
|
458
476
|
S: this,
|
|
459
477
|
C: (f, a) => f(...a)
|
|
460
478
|
});
|
|
@@ -462,7 +480,7 @@ var Connection = class {
|
|
|
462
480
|
}
|
|
463
481
|
invariant(msg.data.signal || msg.data.signalBatch, void 0, {
|
|
464
482
|
F: __dxlog_file,
|
|
465
|
-
L:
|
|
483
|
+
L: 396,
|
|
466
484
|
S: this,
|
|
467
485
|
A: [
|
|
468
486
|
"msg.data.signal || msg.data.signalBatch",
|
|
@@ -471,7 +489,7 @@ var Connection = class {
|
|
|
471
489
|
});
|
|
472
490
|
invariant(msg.author?.equals(this.remoteId), void 0, {
|
|
473
491
|
F: __dxlog_file,
|
|
474
|
-
L:
|
|
492
|
+
L: 397,
|
|
475
493
|
S: this,
|
|
476
494
|
A: [
|
|
477
495
|
"msg.author?.equals(this.remoteId)",
|
|
@@ -480,7 +498,7 @@ var Connection = class {
|
|
|
480
498
|
});
|
|
481
499
|
invariant(msg.recipient?.equals(this.ownId), void 0, {
|
|
482
500
|
F: __dxlog_file,
|
|
483
|
-
L:
|
|
501
|
+
L: 398,
|
|
484
502
|
S: this,
|
|
485
503
|
A: [
|
|
486
504
|
"msg.recipient?.equals(this.ownId)",
|
|
@@ -504,7 +522,7 @@ var Connection = class {
|
|
|
504
522
|
msg: msg.data
|
|
505
523
|
}, {
|
|
506
524
|
F: __dxlog_file,
|
|
507
|
-
L:
|
|
525
|
+
L: 407,
|
|
508
526
|
S: this,
|
|
509
527
|
C: (f, a) => f(...a)
|
|
510
528
|
});
|
|
@@ -512,7 +530,7 @@ var Connection = class {
|
|
|
512
530
|
} else {
|
|
513
531
|
invariant(this._transport, "Connection not ready to accept signals.", {
|
|
514
532
|
F: __dxlog_file,
|
|
515
|
-
L:
|
|
533
|
+
L: 410,
|
|
516
534
|
S: this,
|
|
517
535
|
A: [
|
|
518
536
|
"this._transport",
|
|
@@ -525,7 +543,7 @@ var Connection = class {
|
|
|
525
543
|
msg: msg.data
|
|
526
544
|
}, {
|
|
527
545
|
F: __dxlog_file,
|
|
528
|
-
L:
|
|
546
|
+
L: 411,
|
|
529
547
|
S: this,
|
|
530
548
|
C: (f, a) => f(...a)
|
|
531
549
|
});
|
|
@@ -543,13 +561,13 @@ var Connection = class {
|
|
|
543
561
|
peerId: this.ownId
|
|
544
562
|
}, {
|
|
545
563
|
F: __dxlog_file,
|
|
546
|
-
L:
|
|
564
|
+
L: 422,
|
|
547
565
|
S: this,
|
|
548
566
|
C: (f, a) => f(...a)
|
|
549
567
|
});
|
|
550
568
|
invariant(state !== this._state, "Already in this state.", {
|
|
551
569
|
F: __dxlog_file,
|
|
552
|
-
L:
|
|
570
|
+
L: 423,
|
|
553
571
|
S: this,
|
|
554
572
|
A: [
|
|
555
573
|
"state !== this._state",
|
|
@@ -559,7 +577,16 @@ var Connection = class {
|
|
|
559
577
|
this._state = state;
|
|
560
578
|
this.stateChanged.emit(state);
|
|
561
579
|
}
|
|
580
|
+
async _emitTransportStats() {
|
|
581
|
+
const stats = await this.transport?.getStats();
|
|
582
|
+
if (stats) {
|
|
583
|
+
this.transportStats.emit(stats);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
562
586
|
};
|
|
587
|
+
_ts_decorate([
|
|
588
|
+
logInfo
|
|
589
|
+
], Connection.prototype, "sessionIdString", null);
|
|
563
590
|
_ts_decorate([
|
|
564
591
|
synchronized
|
|
565
592
|
], Connection.prototype, "abort", null);
|
|
@@ -816,7 +843,7 @@ import { Context as Context4 } from "@dxos/context";
|
|
|
816
843
|
import { ErrorStream as ErrorStream2 } from "@dxos/debug";
|
|
817
844
|
import { invariant as invariant4 } from "@dxos/invariant";
|
|
818
845
|
import { PublicKey as PublicKey4 } from "@dxos/keys";
|
|
819
|
-
import { log as log4, logInfo } from "@dxos/log";
|
|
846
|
+
import { log as log4, logInfo as logInfo2 } from "@dxos/log";
|
|
820
847
|
import { trace as trace2 } from "@dxos/protocols";
|
|
821
848
|
import { ComplexMap as ComplexMap2, isNotNullOrUndefined } from "@dxos/util";
|
|
822
849
|
|
|
@@ -1780,13 +1807,13 @@ var Swarm = class {
|
|
|
1780
1807
|
}
|
|
1781
1808
|
};
|
|
1782
1809
|
_ts_decorate3([
|
|
1783
|
-
|
|
1810
|
+
logInfo2
|
|
1784
1811
|
], Swarm.prototype, "_instanceId", void 0);
|
|
1785
1812
|
_ts_decorate3([
|
|
1786
|
-
|
|
1813
|
+
logInfo2
|
|
1787
1814
|
], Swarm.prototype, "ownPeerId", null);
|
|
1788
1815
|
_ts_decorate3([
|
|
1789
|
-
|
|
1816
|
+
logInfo2
|
|
1790
1817
|
], Swarm.prototype, "topic", null);
|
|
1791
1818
|
_ts_decorate3([
|
|
1792
1819
|
synchronized3
|
|
@@ -2003,7 +2030,7 @@ var ConnectionLog = class {
|
|
|
2003
2030
|
};
|
|
2004
2031
|
info.connections.push(connectionInfo);
|
|
2005
2032
|
this.update.emit();
|
|
2006
|
-
connection.stateChanged.on((state) => {
|
|
2033
|
+
connection.stateChanged.on(async (state) => {
|
|
2007
2034
|
connectionInfo.state = state;
|
|
2008
2035
|
connectionInfo.closeReason = connection.closeReason;
|
|
2009
2036
|
connectionInfo.lastUpdate = /* @__PURE__ */ new Date();
|
|
@@ -2011,6 +2038,10 @@ var ConnectionLog = class {
|
|
|
2011
2038
|
type: EventType.CONNECTION_STATE_CHANGED,
|
|
2012
2039
|
newState: state
|
|
2013
2040
|
});
|
|
2041
|
+
if (state === ConnectionState.CONNECTED) {
|
|
2042
|
+
const details = await connection.transport?.getDetails();
|
|
2043
|
+
connectionInfo.transportDetails = details;
|
|
2044
|
+
}
|
|
2014
2045
|
this.update.emit();
|
|
2015
2046
|
});
|
|
2016
2047
|
connection.protocol?.stats?.on((stats) => {
|
|
@@ -2020,6 +2051,12 @@ var ConnectionLog = class {
|
|
|
2020
2051
|
connectionInfo.lastUpdate = /* @__PURE__ */ new Date();
|
|
2021
2052
|
this.update.emit();
|
|
2022
2053
|
});
|
|
2054
|
+
connection.transportStats?.on((stats) => {
|
|
2055
|
+
connectionInfo.transportBytesSent = stats.bytesSent;
|
|
2056
|
+
connectionInfo.transportBytesReceived = stats.bytesReceived;
|
|
2057
|
+
connectionInfo.transportPacketsSent = stats.packetsSent;
|
|
2058
|
+
connectionInfo.transportPacketsReceived = stats.packetsReceived;
|
|
2059
|
+
});
|
|
2023
2060
|
gcSwarm(info);
|
|
2024
2061
|
});
|
|
2025
2062
|
}
|
|
@@ -2323,9 +2360,12 @@ import distance from "xor-distance";
|
|
|
2323
2360
|
import { invariant as invariant8 } from "@dxos/invariant";
|
|
2324
2361
|
import { log as log8 } from "@dxos/log";
|
|
2325
2362
|
var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/topology/mmst-topology.ts";
|
|
2363
|
+
var MIN_UPDATE_INTERVAL = 1e3 * 10;
|
|
2364
|
+
var MAX_CHANGES_PER_UPDATE = 1;
|
|
2326
2365
|
var MMSTTopology = class {
|
|
2327
2366
|
constructor({ originateConnections = 2, maxPeers = 4, sampleSize = 10 } = {}) {
|
|
2328
2367
|
this._sampleCollected = false;
|
|
2368
|
+
this._lastAction = /* @__PURE__ */ new Date(0);
|
|
2329
2369
|
this._originateConnections = originateConnections;
|
|
2330
2370
|
this._maxPeers = maxPeers;
|
|
2331
2371
|
this._sampleSize = sampleSize;
|
|
@@ -2333,7 +2373,7 @@ var MMSTTopology = class {
|
|
|
2333
2373
|
init(controller) {
|
|
2334
2374
|
invariant8(!this._controller, "Already initialized", {
|
|
2335
2375
|
F: __dxlog_file9,
|
|
2336
|
-
L:
|
|
2376
|
+
L: 51,
|
|
2337
2377
|
S: this,
|
|
2338
2378
|
A: [
|
|
2339
2379
|
"!this._controller",
|
|
@@ -2345,7 +2385,7 @@ var MMSTTopology = class {
|
|
|
2345
2385
|
update() {
|
|
2346
2386
|
invariant8(this._controller, "Not initialized", {
|
|
2347
2387
|
F: __dxlog_file9,
|
|
2348
|
-
L:
|
|
2388
|
+
L: 56,
|
|
2349
2389
|
S: this,
|
|
2350
2390
|
A: [
|
|
2351
2391
|
"this._controller",
|
|
@@ -2356,7 +2396,7 @@ var MMSTTopology = class {
|
|
|
2356
2396
|
if (this._sampleCollected || connected.length > this._maxPeers || candidates.length > 0) {
|
|
2357
2397
|
log8("Running the algorithm.", void 0, {
|
|
2358
2398
|
F: __dxlog_file9,
|
|
2359
|
-
L:
|
|
2399
|
+
L: 60,
|
|
2360
2400
|
S: this,
|
|
2361
2401
|
C: (f, a) => f(...a)
|
|
2362
2402
|
});
|
|
@@ -2367,7 +2407,7 @@ var MMSTTopology = class {
|
|
|
2367
2407
|
async onOffer(peer) {
|
|
2368
2408
|
invariant8(this._controller, "Not initialized", {
|
|
2369
2409
|
F: __dxlog_file9,
|
|
2370
|
-
L:
|
|
2410
|
+
L: 67,
|
|
2371
2411
|
S: this,
|
|
2372
2412
|
A: [
|
|
2373
2413
|
"this._controller",
|
|
@@ -2378,7 +2418,7 @@ var MMSTTopology = class {
|
|
|
2378
2418
|
const accept = connected.length < this._maxPeers;
|
|
2379
2419
|
log8(`Offer ${peer} accept=${accept}`, void 0, {
|
|
2380
2420
|
F: __dxlog_file9,
|
|
2381
|
-
L:
|
|
2421
|
+
L: 70,
|
|
2382
2422
|
S: this,
|
|
2383
2423
|
C: (f, a) => f(...a)
|
|
2384
2424
|
});
|
|
@@ -2389,7 +2429,7 @@ var MMSTTopology = class {
|
|
|
2389
2429
|
_runAlgorithm() {
|
|
2390
2430
|
invariant8(this._controller, "Not initialized", {
|
|
2391
2431
|
F: __dxlog_file9,
|
|
2392
|
-
L:
|
|
2432
|
+
L: 79,
|
|
2393
2433
|
S: this,
|
|
2394
2434
|
A: [
|
|
2395
2435
|
"this._controller",
|
|
@@ -2398,27 +2438,84 @@ var MMSTTopology = class {
|
|
|
2398
2438
|
});
|
|
2399
2439
|
const { connected, candidates, ownPeerId } = this._controller.getState();
|
|
2400
2440
|
if (connected.length > this._maxPeers) {
|
|
2441
|
+
log8(`disconnect ${connected.length - this._maxPeers} peers.`, void 0, {
|
|
2442
|
+
F: __dxlog_file9,
|
|
2443
|
+
L: 85,
|
|
2444
|
+
S: this,
|
|
2445
|
+
C: (f, a) => f(...a)
|
|
2446
|
+
});
|
|
2401
2447
|
const sorted = sortByXorDistance(connected, ownPeerId).reverse().slice(0, this._maxPeers - connected.length);
|
|
2402
|
-
|
|
2403
|
-
|
|
2448
|
+
invariant8(sorted.length === 0, void 0, {
|
|
2449
|
+
F: __dxlog_file9,
|
|
2450
|
+
L: 89,
|
|
2451
|
+
S: this,
|
|
2452
|
+
A: [
|
|
2453
|
+
"sorted.length === 0",
|
|
2454
|
+
""
|
|
2455
|
+
]
|
|
2456
|
+
});
|
|
2457
|
+
if (sorted.length > MAX_CHANGES_PER_UPDATE) {
|
|
2458
|
+
log8(`want to disconnect ${sorted.length} peers but limited to ${MAX_CHANGES_PER_UPDATE}`, void 0, {
|
|
2459
|
+
F: __dxlog_file9,
|
|
2460
|
+
L: 92,
|
|
2461
|
+
S: this,
|
|
2462
|
+
C: (f, a) => f(...a)
|
|
2463
|
+
});
|
|
2464
|
+
}
|
|
2465
|
+
if (Date.now() - this._lastAction.getTime() > MIN_UPDATE_INTERVAL) {
|
|
2466
|
+
for (const peer of sorted.slice(0, MAX_CHANGES_PER_UPDATE)) {
|
|
2467
|
+
log8(`Disconnect ${peer}.`, void 0, {
|
|
2468
|
+
F: __dxlog_file9,
|
|
2469
|
+
L: 97,
|
|
2470
|
+
S: this,
|
|
2471
|
+
C: (f, a) => f(...a)
|
|
2472
|
+
});
|
|
2473
|
+
this._controller.disconnect(peer);
|
|
2474
|
+
}
|
|
2475
|
+
this._lastAction = /* @__PURE__ */ new Date();
|
|
2476
|
+
} else {
|
|
2477
|
+
log8("rate limited discconnect", void 0, {
|
|
2404
2478
|
F: __dxlog_file9,
|
|
2405
|
-
L:
|
|
2479
|
+
L: 102,
|
|
2406
2480
|
S: this,
|
|
2407
2481
|
C: (f, a) => f(...a)
|
|
2408
2482
|
});
|
|
2409
|
-
this._controller.disconnect(peer);
|
|
2410
2483
|
}
|
|
2411
2484
|
} else if (connected.length < this._originateConnections) {
|
|
2485
|
+
log8(`connect ${this._originateConnections - connected.length} peers.`, void 0, {
|
|
2486
|
+
F: __dxlog_file9,
|
|
2487
|
+
L: 106,
|
|
2488
|
+
S: this,
|
|
2489
|
+
C: (f, a) => f(...a)
|
|
2490
|
+
});
|
|
2412
2491
|
const sample = candidates.sort(() => Math.random() - 0.5).slice(0, this._sampleSize);
|
|
2413
2492
|
const sorted = sortByXorDistance(sample, ownPeerId).slice(0, this._originateConnections - connected.length);
|
|
2414
|
-
|
|
2415
|
-
log8(`
|
|
2493
|
+
if (sorted.length > MAX_CHANGES_PER_UPDATE) {
|
|
2494
|
+
log8(`want to connect ${sorted.length} peers but limited to ${MAX_CHANGES_PER_UPDATE}`, void 0, {
|
|
2416
2495
|
F: __dxlog_file9,
|
|
2417
|
-
L:
|
|
2496
|
+
L: 111,
|
|
2497
|
+
S: this,
|
|
2498
|
+
C: (f, a) => f(...a)
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
if (Date.now() - this._lastAction.getTime() > MIN_UPDATE_INTERVAL) {
|
|
2502
|
+
for (const peer of sorted.slice(0, MAX_CHANGES_PER_UPDATE)) {
|
|
2503
|
+
log8(`Connect ${peer}.`, void 0, {
|
|
2504
|
+
F: __dxlog_file9,
|
|
2505
|
+
L: 115,
|
|
2506
|
+
S: this,
|
|
2507
|
+
C: (f, a) => f(...a)
|
|
2508
|
+
});
|
|
2509
|
+
this._controller.connect(peer);
|
|
2510
|
+
}
|
|
2511
|
+
this._lastAction = /* @__PURE__ */ new Date();
|
|
2512
|
+
} else {
|
|
2513
|
+
log8("rate limited connect", void 0, {
|
|
2514
|
+
F: __dxlog_file9,
|
|
2515
|
+
L: 120,
|
|
2418
2516
|
S: this,
|
|
2419
2517
|
C: (f, a) => f(...a)
|
|
2420
2518
|
});
|
|
2421
|
-
this._controller.connect(peer);
|
|
2422
2519
|
}
|
|
2423
2520
|
}
|
|
2424
2521
|
}
|
|
@@ -2530,7 +2627,7 @@ import { Event as Event7, Trigger } from "@dxos/async";
|
|
|
2530
2627
|
import { ErrorStream as ErrorStream3 } from "@dxos/debug";
|
|
2531
2628
|
import { invariant as invariant10 } from "@dxos/invariant";
|
|
2532
2629
|
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
2533
|
-
import { log as log10, logInfo as
|
|
2630
|
+
import { log as log10, logInfo as logInfo3 } from "@dxos/log";
|
|
2534
2631
|
import { ComplexMap as ComplexMap7 } from "@dxos/util";
|
|
2535
2632
|
function _ts_decorate4(decorators, target, key, desc) {
|
|
2536
2633
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -2705,12 +2802,23 @@ var MemoryTransport = class _MemoryTransport {
|
|
|
2705
2802
|
this._remote.wake(remoteId);
|
|
2706
2803
|
}
|
|
2707
2804
|
}
|
|
2805
|
+
async getDetails() {
|
|
2806
|
+
return this._instanceId.toHex();
|
|
2807
|
+
}
|
|
2808
|
+
async getStats() {
|
|
2809
|
+
return {
|
|
2810
|
+
bytesSent: 0,
|
|
2811
|
+
bytesReceived: 0,
|
|
2812
|
+
packetsSent: 0,
|
|
2813
|
+
packetsReceived: 0
|
|
2814
|
+
};
|
|
2815
|
+
}
|
|
2708
2816
|
};
|
|
2709
2817
|
_ts_decorate4([
|
|
2710
|
-
|
|
2818
|
+
logInfo3
|
|
2711
2819
|
], MemoryTransport.prototype, "_instanceId", void 0);
|
|
2712
2820
|
_ts_decorate4([
|
|
2713
|
-
|
|
2821
|
+
logInfo3
|
|
2714
2822
|
], MemoryTransport.prototype, "_remoteInstanceId", void 0);
|
|
2715
2823
|
|
|
2716
2824
|
// packages/core/mesh/network-manager/src/transport/transport.ts
|
|
@@ -2742,6 +2850,9 @@ try {
|
|
|
2742
2850
|
// packages/core/mesh/network-manager/src/transport/simplepeer-transport.ts
|
|
2743
2851
|
var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/core/mesh/network-manager/src/transport/simplepeer-transport.ts";
|
|
2744
2852
|
var SimplePeerTransport = class {
|
|
2853
|
+
/**
|
|
2854
|
+
* @params opts.config formatted as per https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection
|
|
2855
|
+
*/
|
|
2745
2856
|
constructor(params) {
|
|
2746
2857
|
this.params = params;
|
|
2747
2858
|
this._closed = false;
|
|
@@ -2754,13 +2865,13 @@ var SimplePeerTransport = class {
|
|
|
2754
2865
|
id: this._instanceId
|
|
2755
2866
|
}), {
|
|
2756
2867
|
F: __dxlog_file12,
|
|
2757
|
-
L:
|
|
2868
|
+
L: 44,
|
|
2758
2869
|
S: this,
|
|
2759
2870
|
C: (f, a) => f(...a)
|
|
2760
2871
|
});
|
|
2761
2872
|
log11("created connection", params, {
|
|
2762
2873
|
F: __dxlog_file12,
|
|
2763
|
-
L:
|
|
2874
|
+
L: 45,
|
|
2764
2875
|
S: this,
|
|
2765
2876
|
C: (f, a) => f(...a)
|
|
2766
2877
|
});
|
|
@@ -2773,7 +2884,7 @@ var SimplePeerTransport = class {
|
|
|
2773
2884
|
this._peer.on("signal", async (data) => {
|
|
2774
2885
|
log11("signal", data, {
|
|
2775
2886
|
F: __dxlog_file12,
|
|
2776
|
-
L:
|
|
2887
|
+
L: 54,
|
|
2777
2888
|
S: this,
|
|
2778
2889
|
C: (f, a) => f(...a)
|
|
2779
2890
|
});
|
|
@@ -2786,7 +2897,7 @@ var SimplePeerTransport = class {
|
|
|
2786
2897
|
this._peer.on("connect", () => {
|
|
2787
2898
|
log11("connected", void 0, {
|
|
2788
2899
|
F: __dxlog_file12,
|
|
2789
|
-
L:
|
|
2900
|
+
L: 59,
|
|
2790
2901
|
S: this,
|
|
2791
2902
|
C: (f, a) => f(...a)
|
|
2792
2903
|
});
|
|
@@ -2797,7 +2908,7 @@ var SimplePeerTransport = class {
|
|
|
2797
2908
|
this._peer.on("close", async () => {
|
|
2798
2909
|
log11("closed", void 0, {
|
|
2799
2910
|
F: __dxlog_file12,
|
|
2800
|
-
L:
|
|
2911
|
+
L: 66,
|
|
2801
2912
|
S: this,
|
|
2802
2913
|
C: (f, a) => f(...a)
|
|
2803
2914
|
});
|
|
@@ -2812,7 +2923,7 @@ var SimplePeerTransport = class {
|
|
|
2812
2923
|
err
|
|
2813
2924
|
}, {
|
|
2814
2925
|
F: __dxlog_file12,
|
|
2815
|
-
L:
|
|
2926
|
+
L: 77,
|
|
2816
2927
|
S: this,
|
|
2817
2928
|
C: (f, a) => f(...a)
|
|
2818
2929
|
});
|
|
@@ -2821,7 +2932,7 @@ var SimplePeerTransport = class {
|
|
|
2821
2932
|
} else if ("code" in err) {
|
|
2822
2933
|
log11.info("simple-peer error", err, {
|
|
2823
2934
|
F: __dxlog_file12,
|
|
2824
|
-
L:
|
|
2935
|
+
L: 82,
|
|
2825
2936
|
S: this,
|
|
2826
2937
|
C: (f, a) => f(...a)
|
|
2827
2938
|
});
|
|
@@ -2851,7 +2962,7 @@ var SimplePeerTransport = class {
|
|
|
2851
2962
|
} else {
|
|
2852
2963
|
log11.info("unknown peer connection error", err, {
|
|
2853
2964
|
F: __dxlog_file12,
|
|
2854
|
-
L:
|
|
2965
|
+
L: 108,
|
|
2855
2966
|
S: this,
|
|
2856
2967
|
C: (f, a) => f(...a)
|
|
2857
2968
|
});
|
|
@@ -2862,10 +2973,10 @@ var SimplePeerTransport = class {
|
|
|
2862
2973
|
this._peer._pc.getStats().then((stats) => {
|
|
2863
2974
|
log11.info("report after webrtc error", {
|
|
2864
2975
|
config: this.params.webrtcConfig,
|
|
2865
|
-
stats
|
|
2976
|
+
stats: Object.fromEntries(stats.entries())
|
|
2866
2977
|
}, {
|
|
2867
2978
|
F: __dxlog_file12,
|
|
2868
|
-
L:
|
|
2979
|
+
L: 116,
|
|
2869
2980
|
S: this,
|
|
2870
2981
|
C: (f, a) => f(...a)
|
|
2871
2982
|
});
|
|
@@ -2874,7 +2985,7 @@ var SimplePeerTransport = class {
|
|
|
2874
2985
|
} catch (err2) {
|
|
2875
2986
|
log11.catch(err2, void 0, {
|
|
2876
2987
|
F: __dxlog_file12,
|
|
2877
|
-
L:
|
|
2988
|
+
L: 123,
|
|
2878
2989
|
S: this,
|
|
2879
2990
|
C: (f, a) => f(...a)
|
|
2880
2991
|
});
|
|
@@ -2885,28 +2996,81 @@ var SimplePeerTransport = class {
|
|
|
2885
2996
|
id: this._instanceId
|
|
2886
2997
|
}), {
|
|
2887
2998
|
F: __dxlog_file12,
|
|
2888
|
-
L:
|
|
2999
|
+
L: 129,
|
|
2889
3000
|
S: this,
|
|
2890
3001
|
C: (f, a) => f(...a)
|
|
2891
3002
|
});
|
|
2892
3003
|
}
|
|
3004
|
+
async getStats() {
|
|
3005
|
+
const stats = await this._getStats();
|
|
3006
|
+
if (!stats) {
|
|
3007
|
+
return {
|
|
3008
|
+
bytesSent: 0,
|
|
3009
|
+
bytesReceived: 0,
|
|
3010
|
+
packetsSent: 0,
|
|
3011
|
+
packetsReceived: 0,
|
|
3012
|
+
rawStats: {}
|
|
3013
|
+
};
|
|
3014
|
+
}
|
|
3015
|
+
return {
|
|
3016
|
+
bytesSent: stats.transport.bytesSent,
|
|
3017
|
+
bytesReceived: stats.transport.bytesReceived,
|
|
3018
|
+
packetsSent: stats.transport.packetsSent,
|
|
3019
|
+
packetsReceived: stats.transport.packetsReceived,
|
|
3020
|
+
rawStats: stats.raw
|
|
3021
|
+
};
|
|
3022
|
+
}
|
|
3023
|
+
async _getStats() {
|
|
3024
|
+
if (typeof this._peer?._pc?.getStats !== "function") {
|
|
3025
|
+
return null;
|
|
3026
|
+
}
|
|
3027
|
+
return await this._peer._pc.getStats().then((stats) => {
|
|
3028
|
+
const statsEntries = Array.from(stats.entries());
|
|
3029
|
+
const transport = statsEntries.filter((s) => s[1].type === "transport")[0][1];
|
|
3030
|
+
const candidatePair = statsEntries.filter((s) => s[0] === transport.selectedCandidatePairId);
|
|
3031
|
+
let selectedCandidatePair;
|
|
3032
|
+
let remoteCandidate;
|
|
3033
|
+
if (candidatePair.length > 0) {
|
|
3034
|
+
selectedCandidatePair = candidatePair[0][1];
|
|
3035
|
+
remoteCandidate = statsEntries.filter((s) => s[0] === selectedCandidatePair.remoteCandidateId)[0][1];
|
|
3036
|
+
}
|
|
3037
|
+
return {
|
|
3038
|
+
datachannel: statsEntries.filter((s) => s[1].type === "data-channel")[0][1],
|
|
3039
|
+
transport,
|
|
3040
|
+
selectedCandidatePair,
|
|
3041
|
+
remoteCandidate,
|
|
3042
|
+
raw: Object.fromEntries(stats.entries())
|
|
3043
|
+
};
|
|
3044
|
+
});
|
|
3045
|
+
}
|
|
3046
|
+
async getDetails() {
|
|
3047
|
+
const stats = await this._getStats();
|
|
3048
|
+
const rc = stats?.remoteCandidate;
|
|
3049
|
+
if (!rc) {
|
|
3050
|
+
return "unavailable";
|
|
3051
|
+
}
|
|
3052
|
+
if (rc.candidateType === "relay") {
|
|
3053
|
+
return `${rc.ip}:${rc.port}/${rc.protocol} relay for ${rc.relatedAddress}:${rc.relatedPort}`;
|
|
3054
|
+
}
|
|
3055
|
+
return `${rc.ip}:${rc.port}/${rc.protocol} ${rc.candidateType}`;
|
|
3056
|
+
}
|
|
2893
3057
|
async destroy() {
|
|
2894
3058
|
log11("closing...", void 0, {
|
|
2895
3059
|
F: __dxlog_file12,
|
|
2896
|
-
L:
|
|
3060
|
+
L: 192,
|
|
2897
3061
|
S: this,
|
|
2898
3062
|
C: (f, a) => f(...a)
|
|
2899
3063
|
});
|
|
2900
3064
|
if (this._closed) {
|
|
2901
3065
|
return;
|
|
2902
3066
|
}
|
|
2903
|
-
this._closed = true;
|
|
2904
3067
|
this._disconnectStreams();
|
|
2905
3068
|
this._peer.destroy();
|
|
3069
|
+
this._closed = true;
|
|
2906
3070
|
this.closed.emit();
|
|
2907
3071
|
log11("closed", void 0, {
|
|
2908
3072
|
F: __dxlog_file12,
|
|
2909
|
-
L:
|
|
3073
|
+
L: 200,
|
|
2910
3074
|
S: this,
|
|
2911
3075
|
C: (f, a) => f(...a)
|
|
2912
3076
|
});
|
|
@@ -3021,7 +3185,7 @@ var SimplePeerTransportService = class {
|
|
|
3021
3185
|
async sendSignal({ proxyId, signal }) {
|
|
3022
3186
|
invariant12(this.transports.has(proxyId), void 0, {
|
|
3023
3187
|
F: __dxlog_file13,
|
|
3024
|
-
L:
|
|
3188
|
+
L: 116,
|
|
3025
3189
|
S: this,
|
|
3026
3190
|
A: [
|
|
3027
3191
|
"this.transports.has(proxyId)",
|
|
@@ -3030,18 +3194,46 @@ var SimplePeerTransportService = class {
|
|
|
3030
3194
|
});
|
|
3031
3195
|
await this.transports.get(proxyId).transport.signal(signal);
|
|
3032
3196
|
}
|
|
3197
|
+
async getDetails({ proxyId }) {
|
|
3198
|
+
invariant12(this.transports.has(proxyId), void 0, {
|
|
3199
|
+
F: __dxlog_file13,
|
|
3200
|
+
L: 121,
|
|
3201
|
+
S: this,
|
|
3202
|
+
A: [
|
|
3203
|
+
"this.transports.has(proxyId)",
|
|
3204
|
+
""
|
|
3205
|
+
]
|
|
3206
|
+
});
|
|
3207
|
+
return {
|
|
3208
|
+
details: await this.transports.get(proxyId).transport.getDetails()
|
|
3209
|
+
};
|
|
3210
|
+
}
|
|
3211
|
+
async getStats({ proxyId }) {
|
|
3212
|
+
invariant12(this.transports.has(proxyId), void 0, {
|
|
3213
|
+
F: __dxlog_file13,
|
|
3214
|
+
L: 126,
|
|
3215
|
+
S: this,
|
|
3216
|
+
A: [
|
|
3217
|
+
"this.transports.has(proxyId)",
|
|
3218
|
+
""
|
|
3219
|
+
]
|
|
3220
|
+
});
|
|
3221
|
+
return {
|
|
3222
|
+
stats: await this.transports.get(proxyId).transport.getStats()
|
|
3223
|
+
};
|
|
3224
|
+
}
|
|
3033
3225
|
async sendData({ proxyId, payload }) {
|
|
3034
3226
|
if (this.transports.get(proxyId)?.state !== "OPEN") {
|
|
3035
3227
|
log12.debug("transport is closed", void 0, {
|
|
3036
3228
|
F: __dxlog_file13,
|
|
3037
|
-
L:
|
|
3229
|
+
L: 132,
|
|
3038
3230
|
S: this,
|
|
3039
3231
|
C: (f, a) => f(...a)
|
|
3040
3232
|
});
|
|
3041
3233
|
}
|
|
3042
3234
|
invariant12(this.transports.has(proxyId), void 0, {
|
|
3043
3235
|
F: __dxlog_file13,
|
|
3044
|
-
L:
|
|
3236
|
+
L: 134,
|
|
3045
3237
|
S: this,
|
|
3046
3238
|
A: [
|
|
3047
3239
|
"this.transports.has(proxyId)",
|
|
@@ -3064,7 +3256,7 @@ var SimplePeerTransportService = class {
|
|
|
3064
3256
|
}
|
|
3065
3257
|
log12("Closed.", void 0, {
|
|
3066
3258
|
F: __dxlog_file13,
|
|
3067
|
-
L:
|
|
3259
|
+
L: 150,
|
|
3068
3260
|
S: this,
|
|
3069
3261
|
C: (f, a) => f(...a)
|
|
3070
3262
|
});
|
|
@@ -3203,6 +3395,16 @@ var SimplePeerTransportProxy = class {
|
|
|
3203
3395
|
signal
|
|
3204
3396
|
}).catch((err) => this.errors.raise(decodeError(err)));
|
|
3205
3397
|
}
|
|
3398
|
+
async getDetails() {
|
|
3399
|
+
return (await this._params.bridgeService.getDetails({
|
|
3400
|
+
proxyId: this._proxyId
|
|
3401
|
+
})).details;
|
|
3402
|
+
}
|
|
3403
|
+
async getStats() {
|
|
3404
|
+
return (await this._params.bridgeService.getStats({
|
|
3405
|
+
proxyId: this._proxyId
|
|
3406
|
+
})).stats;
|
|
3407
|
+
}
|
|
3206
3408
|
// TODO(burdon): Move open from constructor.
|
|
3207
3409
|
async destroy() {
|
|
3208
3410
|
await this._ctx.dispose();
|
|
@@ -3217,7 +3419,7 @@ var SimplePeerTransportProxy = class {
|
|
|
3217
3419
|
} catch (err) {
|
|
3218
3420
|
log13.catch(err, void 0, {
|
|
3219
3421
|
F: __dxlog_file14,
|
|
3220
|
-
L:
|
|
3422
|
+
L: 168,
|
|
3221
3423
|
S: this,
|
|
3222
3424
|
C: (f, a) => f(...a)
|
|
3223
3425
|
});
|
|
@@ -3253,7 +3455,7 @@ var SimplePeerTransportProxyFactory = class {
|
|
|
3253
3455
|
createTransport(options) {
|
|
3254
3456
|
invariant13(this._bridgeService, "SimplePeerTransportProxyFactory is not ready to open connections", {
|
|
3255
3457
|
F: __dxlog_file14,
|
|
3256
|
-
L:
|
|
3458
|
+
L: 205,
|
|
3257
3459
|
S: this,
|
|
3258
3460
|
A: [
|
|
3259
3461
|
"this._bridgeService",
|
|
@@ -3316,17 +3518,24 @@ var LibDataChannelTransport = class {
|
|
|
3316
3518
|
this._readyForCandidates = new Trigger2();
|
|
3317
3519
|
this._writeCallback = null;
|
|
3318
3520
|
this._peer = (async () => {
|
|
3319
|
-
const { RTCPeerConnection
|
|
3521
|
+
const { RTCPeerConnection } = (await importESM("node-datachannel/polyfill")).default;
|
|
3320
3522
|
if (this._closed) {
|
|
3321
3523
|
this.errors.raise(new Error("connection already closed"));
|
|
3322
3524
|
}
|
|
3323
|
-
|
|
3525
|
+
if (params.webrtcConfig) {
|
|
3526
|
+
params.webrtcConfig.iceServers = params.webrtcConfig.iceServers ?? [];
|
|
3527
|
+
} else {
|
|
3528
|
+
params.webrtcConfig = {
|
|
3529
|
+
iceServers: []
|
|
3530
|
+
};
|
|
3531
|
+
}
|
|
3532
|
+
const peer = new RTCPeerConnection(params.webrtcConfig);
|
|
3324
3533
|
peer.onicecandidateerror = (event) => {
|
|
3325
3534
|
log14.error("peer.onicecandidateerror", {
|
|
3326
3535
|
event
|
|
3327
3536
|
}, {
|
|
3328
3537
|
F: __dxlog_file15,
|
|
3329
|
-
L:
|
|
3538
|
+
L: 61,
|
|
3330
3539
|
S: this,
|
|
3331
3540
|
C: (f, a) => f(...a)
|
|
3332
3541
|
});
|
|
@@ -3338,7 +3547,7 @@ var LibDataChannelTransport = class {
|
|
|
3338
3547
|
transportConnectionState: this._connected
|
|
3339
3548
|
}, {
|
|
3340
3549
|
F: __dxlog_file15,
|
|
3341
|
-
L:
|
|
3550
|
+
L: 65,
|
|
3342
3551
|
S: this,
|
|
3343
3552
|
C: (f, a) => f(...a)
|
|
3344
3553
|
});
|
|
@@ -3348,7 +3557,7 @@ var LibDataChannelTransport = class {
|
|
|
3348
3557
|
event
|
|
3349
3558
|
}, {
|
|
3350
3559
|
F: __dxlog_file15,
|
|
3351
|
-
L:
|
|
3560
|
+
L: 74,
|
|
3352
3561
|
S: this,
|
|
3353
3562
|
C: (f, a) => f(...a)
|
|
3354
3563
|
});
|
|
@@ -3372,7 +3581,7 @@ var LibDataChannelTransport = class {
|
|
|
3372
3581
|
err
|
|
3373
3582
|
}, {
|
|
3374
3583
|
F: __dxlog_file15,
|
|
3375
|
-
L:
|
|
3584
|
+
L: 91,
|
|
3376
3585
|
S: this,
|
|
3377
3586
|
C: (f, a) => f(...a)
|
|
3378
3587
|
});
|
|
@@ -3381,12 +3590,15 @@ var LibDataChannelTransport = class {
|
|
|
3381
3590
|
};
|
|
3382
3591
|
if (params.initiator) {
|
|
3383
3592
|
peer.createOffer().then(async (offer) => {
|
|
3593
|
+
if (this._closed) {
|
|
3594
|
+
return;
|
|
3595
|
+
}
|
|
3384
3596
|
if (peer.connectionState !== "connecting") {
|
|
3385
3597
|
log14.error("i am initiator but peer not in state connecting", {
|
|
3386
3598
|
peer
|
|
3387
3599
|
}, {
|
|
3388
3600
|
F: __dxlog_file15,
|
|
3389
|
-
L:
|
|
3601
|
+
L: 104,
|
|
3390
3602
|
S: this,
|
|
3391
3603
|
C: (f, a) => f(...a)
|
|
3392
3604
|
});
|
|
@@ -3396,7 +3608,7 @@ var LibDataChannelTransport = class {
|
|
|
3396
3608
|
offer
|
|
3397
3609
|
}, {
|
|
3398
3610
|
F: __dxlog_file15,
|
|
3399
|
-
L:
|
|
3611
|
+
L: 107,
|
|
3400
3612
|
S: this,
|
|
3401
3613
|
C: (f, a) => f(...a)
|
|
3402
3614
|
});
|
|
@@ -3416,7 +3628,7 @@ var LibDataChannelTransport = class {
|
|
|
3416
3628
|
this.handleChannel(peer.createDataChannel(DATACHANNEL_LABEL));
|
|
3417
3629
|
log14.debug("created data channel", void 0, {
|
|
3418
3630
|
F: __dxlog_file15,
|
|
3419
|
-
L:
|
|
3631
|
+
L: 116,
|
|
3420
3632
|
S: this,
|
|
3421
3633
|
C: (f, a) => f(...a)
|
|
3422
3634
|
});
|
|
@@ -3429,7 +3641,7 @@ var LibDataChannelTransport = class {
|
|
|
3429
3641
|
event
|
|
3430
3642
|
}, {
|
|
3431
3643
|
F: __dxlog_file15,
|
|
3432
|
-
L:
|
|
3644
|
+
L: 122,
|
|
3433
3645
|
S: this,
|
|
3434
3646
|
C: (f, a) => f(...a)
|
|
3435
3647
|
});
|
|
@@ -3447,7 +3659,7 @@ var LibDataChannelTransport = class {
|
|
|
3447
3659
|
this._channel.onopen = () => {
|
|
3448
3660
|
log14.debug("dataChannel.onopen", void 0, {
|
|
3449
3661
|
F: __dxlog_file15,
|
|
3450
|
-
L:
|
|
3662
|
+
L: 138,
|
|
3451
3663
|
S: this,
|
|
3452
3664
|
C: (f, a) => f(...a)
|
|
3453
3665
|
});
|
|
@@ -3468,7 +3680,7 @@ var LibDataChannelTransport = class {
|
|
|
3468
3680
|
if (this._writeCallback !== null) {
|
|
3469
3681
|
log14.error("consumer trying to write before we're ready for more data", void 0, {
|
|
3470
3682
|
F: __dxlog_file15,
|
|
3471
|
-
L:
|
|
3683
|
+
L: 155,
|
|
3472
3684
|
S: this,
|
|
3473
3685
|
C: (f, a) => f(...a)
|
|
3474
3686
|
});
|
|
@@ -3493,7 +3705,7 @@ var LibDataChannelTransport = class {
|
|
|
3493
3705
|
err
|
|
3494
3706
|
}, {
|
|
3495
3707
|
F: __dxlog_file15,
|
|
3496
|
-
L:
|
|
3708
|
+
L: 175,
|
|
3497
3709
|
S: this,
|
|
3498
3710
|
C: (f, a) => f(...a)
|
|
3499
3711
|
});
|
|
@@ -3502,7 +3714,7 @@ var LibDataChannelTransport = class {
|
|
|
3502
3714
|
this._channel.onmessage = (event) => {
|
|
3503
3715
|
let data = event.data;
|
|
3504
3716
|
if (data instanceof ArrayBuffer) {
|
|
3505
|
-
data =
|
|
3717
|
+
data = Buffer2.from(data);
|
|
3506
3718
|
}
|
|
3507
3719
|
this._stream.push(data);
|
|
3508
3720
|
};
|
|
@@ -3517,6 +3729,12 @@ var LibDataChannelTransport = class {
|
|
|
3517
3729
|
return;
|
|
3518
3730
|
}
|
|
3519
3731
|
await this._disconnectStreams();
|
|
3732
|
+
const peer = await this._peer;
|
|
3733
|
+
try {
|
|
3734
|
+
peer.close();
|
|
3735
|
+
} catch (err) {
|
|
3736
|
+
this.errors.raise(err);
|
|
3737
|
+
}
|
|
3520
3738
|
this._closed = true;
|
|
3521
3739
|
this.closed.emit();
|
|
3522
3740
|
}
|
|
@@ -3530,7 +3748,7 @@ var LibDataChannelTransport = class {
|
|
|
3530
3748
|
peer
|
|
3531
3749
|
}, {
|
|
3532
3750
|
F: __dxlog_file15,
|
|
3533
|
-
L:
|
|
3751
|
+
L: 216,
|
|
3534
3752
|
S: this,
|
|
3535
3753
|
C: (f, a) => f(...a)
|
|
3536
3754
|
});
|
|
@@ -3558,7 +3776,7 @@ var LibDataChannelTransport = class {
|
|
|
3558
3776
|
err
|
|
3559
3777
|
}, {
|
|
3560
3778
|
F: __dxlog_file15,
|
|
3561
|
-
L:
|
|
3779
|
+
L: 227,
|
|
3562
3780
|
S: this,
|
|
3563
3781
|
C: (f, a) => f(...a)
|
|
3564
3782
|
});
|
|
@@ -3578,7 +3796,7 @@ var LibDataChannelTransport = class {
|
|
|
3578
3796
|
err
|
|
3579
3797
|
}, {
|
|
3580
3798
|
F: __dxlog_file15,
|
|
3581
|
-
L:
|
|
3799
|
+
L: 238,
|
|
3582
3800
|
S: this,
|
|
3583
3801
|
C: (f, a) => f(...a)
|
|
3584
3802
|
});
|
|
@@ -3597,7 +3815,7 @@ var LibDataChannelTransport = class {
|
|
|
3597
3815
|
signal
|
|
3598
3816
|
}, {
|
|
3599
3817
|
F: __dxlog_file15,
|
|
3600
|
-
L:
|
|
3818
|
+
L: 249,
|
|
3601
3819
|
S: this,
|
|
3602
3820
|
C: (f, a) => f(...a)
|
|
3603
3821
|
});
|
|
@@ -3606,12 +3824,62 @@ var LibDataChannelTransport = class {
|
|
|
3606
3824
|
}).catch((err) => {
|
|
3607
3825
|
log14.catch(err, void 0, {
|
|
3608
3826
|
F: __dxlog_file15,
|
|
3609
|
-
L:
|
|
3827
|
+
L: 254,
|
|
3610
3828
|
S: this,
|
|
3611
3829
|
C: (f, a) => f(...a)
|
|
3612
3830
|
});
|
|
3613
3831
|
});
|
|
3614
3832
|
}
|
|
3833
|
+
async getDetails() {
|
|
3834
|
+
const stats = await this._getStats();
|
|
3835
|
+
const rc = stats?.remoteCandidate;
|
|
3836
|
+
if (!rc) {
|
|
3837
|
+
return "unavailable";
|
|
3838
|
+
}
|
|
3839
|
+
if (rc.candidateType === "relay") {
|
|
3840
|
+
return `${rc.ip}:${rc.port} relay for ${rc.relatedAddress}:${rc.relatedPort}`;
|
|
3841
|
+
}
|
|
3842
|
+
return `${rc.ip}:${rc.port} ${rc.candidateType}`;
|
|
3843
|
+
}
|
|
3844
|
+
async _getStats() {
|
|
3845
|
+
return this._peer.then(async (peer) => {
|
|
3846
|
+
const stats = await peer.getStats();
|
|
3847
|
+
const statsEntries = Array.from(stats.entries());
|
|
3848
|
+
const transport = statsEntries.filter((s) => s[1].type === "transport")[0][1];
|
|
3849
|
+
const candidatePair = statsEntries.filter((s) => s[0] === transport.selectedCandidatePairId);
|
|
3850
|
+
let selectedCandidatePair;
|
|
3851
|
+
let remoteCandidate;
|
|
3852
|
+
if (candidatePair.length > 0) {
|
|
3853
|
+
selectedCandidatePair = candidatePair[0][1];
|
|
3854
|
+
remoteCandidate = statsEntries.filter((s) => s[0] === selectedCandidatePair.remoteCandidateId)[0][1];
|
|
3855
|
+
}
|
|
3856
|
+
return {
|
|
3857
|
+
transport,
|
|
3858
|
+
selectedCandidatePair,
|
|
3859
|
+
remoteCandidate,
|
|
3860
|
+
raw: Object.fromEntries(stats)
|
|
3861
|
+
};
|
|
3862
|
+
});
|
|
3863
|
+
}
|
|
3864
|
+
async getStats() {
|
|
3865
|
+
const stats = await this._getStats();
|
|
3866
|
+
if (!stats) {
|
|
3867
|
+
return {
|
|
3868
|
+
bytesSent: 0,
|
|
3869
|
+
bytesReceived: 0,
|
|
3870
|
+
packetsSent: 0,
|
|
3871
|
+
packetsReceived: 0,
|
|
3872
|
+
rawStats: {}
|
|
3873
|
+
};
|
|
3874
|
+
}
|
|
3875
|
+
return {
|
|
3876
|
+
bytesSent: stats.transport.bytesSent,
|
|
3877
|
+
bytesReceived: stats.transport.bytesReceived,
|
|
3878
|
+
packetsSent: 0,
|
|
3879
|
+
packetsReceived: 0,
|
|
3880
|
+
rawStats: stats.raw
|
|
3881
|
+
};
|
|
3882
|
+
}
|
|
3615
3883
|
// TODO(nf): add classmethod to call node-datachannel.cleanup() when all instances have been destroyed?
|
|
3616
3884
|
async destroy() {
|
|
3617
3885
|
await this._close();
|
|
@@ -3629,6 +3897,7 @@ var createLibDataChannelTransportFactory = (webrtcConfig) => ({
|
|
|
3629
3897
|
webrtcConfig
|
|
3630
3898
|
})
|
|
3631
3899
|
});
|
|
3900
|
+
var importESM = Function("path", "return import(path)");
|
|
3632
3901
|
|
|
3633
3902
|
// packages/core/mesh/network-manager/src/transport/tcp-transport.browser.ts
|
|
3634
3903
|
import { Event as Event11 } from "@dxos/async";
|
|
@@ -3648,6 +3917,12 @@ var TcpTransport = class {
|
|
|
3648
3917
|
signal() {
|
|
3649
3918
|
throw new Error("Method not implemented.");
|
|
3650
3919
|
}
|
|
3920
|
+
async getStats() {
|
|
3921
|
+
throw new Error("Method not implemented.");
|
|
3922
|
+
}
|
|
3923
|
+
async getDetails() {
|
|
3924
|
+
throw new Error("Method not implemented.");
|
|
3925
|
+
}
|
|
3651
3926
|
};
|
|
3652
3927
|
|
|
3653
3928
|
// packages/core/mesh/network-manager/src/wire-protocol.ts
|
|
@@ -3657,8 +3932,8 @@ var createTeleportProtocolFactory = (onConnection) => {
|
|
|
3657
3932
|
const teleport = new Teleport(params);
|
|
3658
3933
|
return {
|
|
3659
3934
|
stream: teleport.stream,
|
|
3660
|
-
open: async () => {
|
|
3661
|
-
await teleport.open();
|
|
3935
|
+
open: async (sessionId) => {
|
|
3936
|
+
await teleport.open(sessionId);
|
|
3662
3937
|
await onConnection(teleport);
|
|
3663
3938
|
},
|
|
3664
3939
|
close: async () => {
|
|
@@ -3672,6 +3947,7 @@ var createTeleportProtocolFactory = (onConnection) => {
|
|
|
3672
3947
|
};
|
|
3673
3948
|
|
|
3674
3949
|
export {
|
|
3950
|
+
process,
|
|
3675
3951
|
ConnectionState,
|
|
3676
3952
|
Connection,
|
|
3677
3953
|
SwarmMessenger,
|
|
@@ -3699,4 +3975,4 @@ export {
|
|
|
3699
3975
|
TcpTransport,
|
|
3700
3976
|
createTeleportProtocolFactory
|
|
3701
3977
|
};
|
|
3702
|
-
//# sourceMappingURL=chunk-
|
|
3978
|
+
//# sourceMappingURL=chunk-XF474R3E.mjs.map
|