From 65fe21463dee3b58de8c21172a71f0013e4f2b42 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Wed, 22 Jan 2020 11:57:33 -0800 Subject: [PATCH] quic: refactor finalSize Fixes: https://github.com/nodejs/quic/issues/65 --- doc/api/quic.md | 13 +++++++++++-- lib/internal/quic/core.js | 20 ++++++++++++-------- src/quic/node_quic_http3_application.cc | 3 +-- src/quic/node_quic_http3_application.h | 1 - src/quic/node_quic_session.cc | 13 ++++--------- src/quic/node_quic_session.h | 3 --- src/quic/node_quic_stream-inl.h | 1 + src/quic/node_quic_stream.cc | 11 +---------- src/quic/node_quic_stream.h | 2 ++ test/parallel/test-quic-client-server.js | 7 ++++++- 10 files changed, 38 insertions(+), 36 deletions(-) diff --git a/doc/api/quic.md b/doc/api/quic.md index a9dd003074..fafb11db23 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -1766,8 +1766,7 @@ or writable side has closed naturally. The callback is invoked with two arguments: * `code` {number} The QUIC application error code used to terminate the stream. -* `finalSize` {number} The total number of bytes received by the `QuicStream` - as of the moment the stream was closed. +* `family` {number} Identifier of the error code family. #### Event: `'close'` + +* Type: {BigInt} + +A `BigInt` specifying the total number of bytes successfully received by the +`QuicStream`. + #### quicstream.id