@dxos/network-manager 0.1.53-main.6ef81f0 → 0.1.53-main.75474bf

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.
@@ -1367,6 +1367,7 @@ var ConnectionLog = class {
1367
1367
  this._swarms.set(PublicKey6.from(swarm._instanceId), info);
1368
1368
  this.update.emit();
1369
1369
  swarm.connectionAdded.on((connection) => {
1370
+ var _a, _b;
1370
1371
  const connectionInfo = {
1371
1372
  state: ConnectionState.INITIAL,
1372
1373
  remotePeerId: connection.remoteId,
@@ -1385,6 +1386,10 @@ var ConnectionLog = class {
1385
1386
  });
1386
1387
  this.update.emit();
1387
1388
  });
1389
+ (_b = (_a = connection.protocol) == null ? void 0 : _a.stats) == null ? void 0 : _b.on((stats) => {
1390
+ connectionInfo.streams = stats;
1391
+ this.update.emit();
1392
+ });
1388
1393
  });
1389
1394
  }
1390
1395
  leftSwarm(swarm) {
@@ -2198,6 +2203,7 @@ import { ErrorStream as ErrorStream5 } from "@dxos/debug";
2198
2203
  import { PublicKey as PublicKey11 } from "@dxos/keys";
2199
2204
  import { log as log12 } from "@dxos/log";
2200
2205
  import { ConnectionState as ConnectionState4 } from "@dxos/protocols/proto/dxos/mesh/bridge";
2206
+ import { arrayToBuffer } from "@dxos/util";
2201
2207
  var WebRTCTransportProxy = class {
2202
2208
  // prettier-ignore
2203
2209
  constructor(_params) {
@@ -2216,7 +2222,7 @@ var WebRTCTransportProxy = class {
2216
2222
  this._serviceStream.subscribe(async (event) => {
2217
2223
  log12("WebRTCTransportProxy: event", event, {
2218
2224
  file: "webrtc-transport-proxy.ts",
2219
- line: 49,
2225
+ line: 50,
2220
2226
  scope: this,
2221
2227
  callSite: (f, a) => f(...a)
2222
2228
  });
@@ -2237,7 +2243,7 @@ var WebRTCTransportProxy = class {
2237
2243
  } catch (err) {
2238
2244
  log12.catch(err, {}, {
2239
2245
  file: "webrtc-transport-proxy.ts",
2240
- line: 66,
2246
+ line: 67,
2241
2247
  scope: this,
2242
2248
  callSite: (f, a) => f(...a)
2243
2249
  });
@@ -2249,7 +2255,7 @@ var WebRTCTransportProxy = class {
2249
2255
  });
2250
2256
  }, (error) => log12.catch(error, {}, {
2251
2257
  file: "webrtc-transport-proxy.ts",
2252
- line: 72,
2258
+ line: 73,
2253
2259
  scope: this,
2254
2260
  callSite: (f, a) => f(...a)
2255
2261
  }));
@@ -2270,7 +2276,7 @@ var WebRTCTransportProxy = class {
2270
2276
  }
2271
2277
  }
2272
2278
  _handleData(dataEvent) {
2273
- this._params.stream.write(Buffer.from(dataEvent.payload));
2279
+ this._params.stream.write(arrayToBuffer(dataEvent.payload));
2274
2280
  }
2275
2281
  async _handleSignal(signalEvent) {
2276
2282
  await this._params.sendSignal(signalEvent.payload);
@@ -2295,7 +2301,7 @@ var WebRTCTransportProxy = class {
2295
2301
  } catch (err) {
2296
2302
  log12.catch(err, {}, {
2297
2303
  file: "webrtc-transport-proxy.ts",
2298
- line: 123,
2304
+ line: 124,
2299
2305
  scope: this,
2300
2306
  callSite: (f, a) => f(...a)
2301
2307
  });
@@ -2379,4 +2385,4 @@ export {
2379
2385
  WebRTCTransportProxyFactory,
2380
2386
  createTeleportProtocolFactory
2381
2387
  };
2382
- //# sourceMappingURL=chunk-U73XV3EJ.mjs.map
2388
+ //# sourceMappingURL=chunk-6CP5XM3F.mjs.map