mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-24 04:01:07 +03:00
Count cumulative # of egress packets for a stream
Summary: There are situations where application needs to know how many packets were transmitted for a stream on certain byte range. This diff provides *some* level of that information, by adding the `cumulativeTxedPackets` field in `StreamLike`, which stores the number of egress packets that contain new STREAM frame(s) for a stream. ~~To prevent double-counting, I added a fast set of stream ids.~~ Application could rely on other callbacks (e.g. ByteEventCallback or DeliveryCallback) to get notified, and use `getStreamTransportInfo` to get `packetsTxed` for a stream. Reviewed By: bschlinker, mjoras Differential Revision: D23361789 fbshipit-source-id: 6624ddcbe9cf62c628f936eda2a39d0fc2781636
This commit is contained in:
committed by
Facebook GitHub Bot
parent
820f102401
commit
3fac7d21f4
@@ -403,6 +403,10 @@ folly::Optional<uint64_t> getLargestDeliverableOffset(
|
||||
return stream.ackedIntervals.front().end;
|
||||
}
|
||||
|
||||
uint64_t getNumPacketsTxWithNewData(const QuicStreamState& stream) {
|
||||
return stream.numPacketsTxWithNewData;
|
||||
}
|
||||
|
||||
// TODO reap
|
||||
void cancelHandshakeCryptoStreamRetransmissions(QuicCryptoState& cryptoState) {
|
||||
// Cancel any retransmissions we might want to do for the crypto stream.
|
||||
|
||||
Reference in New Issue
Block a user