@fails-components/webtransport-transport-http3-quiche 1.4.7 → 1.5.1

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/CMakeLists.txt CHANGED
@@ -836,6 +836,12 @@ third_party/quiche/quiche/web_transport/web_transport_headers.h
836
836
  third_party/quiche/quiche/web_transport/web_transport_priority_scheduler.cc
837
837
  third_party/quiche/quiche/web_transport/web_transport_priority_scheduler.h
838
838
  )
839
+ # workaround gquiche problem
840
+ target_precompile_headers(
841
+ gquiche
842
+ PRIVATE
843
+ <cstdint>
844
+ )
839
845
 
840
846
  IF(APPLE OR WIN32)
841
847
  target_sources(gquiche PRIVATE third_party/googleurl/url/url_idna_ascii_only.cc)
@@ -67,7 +67,7 @@ export class Http3WebTransportServerSocket extends Http3WebTransportSocket {
67
67
  .catch((error) => {
68
68
  log('Problem server:', error)
69
69
  // hostname not known
70
- this.jsobj.onServerError()
70
+ this.jsobj.onServerError(error)
71
71
  })
72
72
  }
73
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fails-components/webtransport-transport-http3-quiche",
3
- "version": "1.4.7",
3
+ "version": "1.5.1",
4
4
  "description": "A component to add webtransport support (server and client) to node.js, transport using libquiche",
5
5
  "exports": {
6
6
  ".": {
@@ -229,18 +229,18 @@ namespace quic
229
229
  Napi::Object objVal = Value().Get("jsobj").As<Napi::Object>();
230
230
 
231
231
  Napi::Object retObj = Napi::Object::New(Env());
232
- // expiredOutgoing: bigint
233
- // lostOutgoing: bigint
232
+ // expiredOutgoing: number
233
+ // lostOutgoing: number
234
234
 
235
235
  // non Datagram
236
236
  // minRtt: number
237
237
  // smoothedRtt: number
238
238
  // rttVariation: number
239
- // estimatedSendRateBps: bigint
239
+ // estimatedSendRateBps: number
240
240
  retObj.Set("timestamp", absl::ToDoubleMilliseconds(absl::Duration())); // absl::Duration
241
241
  // datagram
242
- retObj.Set("expiredOutgoing", Napi::BigInt::New(Env(), sessstats.datagram_stats.expired_outgoing)); // uint64_t
243
- retObj.Set("lostOutgoing", Napi::BigInt::New(Env(), sessstats.datagram_stats.lost_outgoing)); // uint64_t
242
+ retObj.Set("expiredOutgoing", sessstats.datagram_stats.expired_outgoing); // uint64_t
243
+ retObj.Set("lostOutgoing", sessstats.datagram_stats.lost_outgoing); // uint64_t
244
244
 
245
245
  // non Datagram
246
246
  retObj.Set("minRtt", absl::ToDoubleMilliseconds(sessstats.min_rtt)); // absl::Duration
@@ -260,8 +260,8 @@ namespace quic
260
260
  Napi::Object retObj = Napi::Object::New(Env());
261
261
  retObj.Set("timestamp", absl::ToDoubleMilliseconds(absl::Duration())); // absl::Duration
262
262
  // datagram
263
- retObj.Set("expiredOutgoing", Napi::BigInt::New(Env(), datastats.expired_outgoing)); // uint64_t
264
- retObj.Set("lostOutgoing", Napi::BigInt::New(Env(), datastats.lost_outgoing)); // uint64_t
263
+ retObj.Set("expiredOutgoing", datastats.expired_outgoing); // uint64_t
264
+ retObj.Set("lostOutgoing", datastats.lost_outgoing); // uint64_t
265
265
 
266
266
  objVal.Get("onDatagramStats").As<Napi::Function>().Call(objVal, {retObj});
267
267
  }
@@ -197,8 +197,7 @@ namespace quic
197
197
  }
198
198
  if (lobj.Has("sendOrder") && !(lobj).Get("sendOrder").IsEmpty()) {
199
199
  Napi::Value sendOrderValue = (lobj).Get("sendOrder");
200
- bool lossless;
201
- sendOrder = sendOrderValue.As<Napi::BigInt>().Uint64Value(&lossless);
200
+ sendOrder = sendOrderValue.As<Napi::Number>().Int64Value();
202
201
  }
203
202
  }
204
203
  }
@@ -235,8 +234,7 @@ namespace quic
235
234
  }
236
235
  if (lobj.Has("sendOrder") && !(lobj).Get("sendOrder").IsEmpty()) {
237
236
  Napi::Value sendOrderValue = (lobj).Get("sendOrder");
238
- bool lossless;
239
- sendOrder = sendOrderValue.As<Napi::BigInt>().Uint64Value(&lossless);
237
+ sendOrder = sendOrderValue.As<Napi::Number>().Int64Value();
240
238
  }
241
239
  }
242
240
  }
@@ -294,8 +294,7 @@ namespace quic
294
294
  if (obj.Has("sendOrder") && !(obj).Get("sendOrder").IsEmpty())
295
295
  {
296
296
  Napi::Value sendOrderValue = (obj).Get("sendOrder");
297
- bool approx;
298
- sendOrder = sendOrderValue.As<Napi::BigInt>().Uint64Value(&approx);
297
+ sendOrder = sendOrderValue.As<Napi::Number>().Int64Value();
299
298
  }
300
299
  if (obj.Has("sendGroupId") && !(obj).Get("sendGroupId").IsEmpty())
301
300
  {