mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-06 22:22:38 +03:00
QuicSocket::setDSRPacketizationRequestSender API
Summary: This assigns a DSRPacketizationRequestSender to a QUIC stream, and let it own it. Reviewed By: mjoras Differential Revision: D27668523 fbshipit-source-id: 4beba6ddf247801368c3e1c24a0a4956490d45cd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c0cc396363
commit
aa59f9ef32
@@ -19,6 +19,7 @@
|
||||
#include <quic/common/BufUtil.h>
|
||||
#include <quic/common/Timers.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/dsr/test/Mocks.h>
|
||||
#include <quic/handshake/test/Mocks.h>
|
||||
#include <quic/logging/test/Mocks.h>
|
||||
#include <quic/server/state/ServerStateMachine.h>
|
||||
@@ -3409,11 +3410,13 @@ TEST_F(QuicTransportTest, PrioritySetAndGet) {
|
||||
EXPECT_EQ(LocalErrorCode::CONNECTION_CLOSED, closedConnStreamPri.error());
|
||||
}
|
||||
|
||||
TEST_F(QuicTransportTest, WriteBufMetaIntoStream) {
|
||||
TEST_F(QuicTransportTest, SetDSRSenderAndWriteBufMetaIntoStream) {
|
||||
auto streamId = transport_->createBidirectionalStream().value();
|
||||
size_t bufferLength = 2000;
|
||||
BufferMeta meta(bufferLength);
|
||||
auto buf = buildRandomInputData(20);
|
||||
auto dsrSender = std::make_unique<MockDSRPacketizationRequestSender>();
|
||||
transport_->setDSRPacketizationRequestSender(streamId, std::move(dsrSender));
|
||||
// Some amount of real data needs to be written first:
|
||||
transport_->writeChain(streamId, std::move(buf), false);
|
||||
transport_->writeBufMeta(streamId, meta, true);
|
||||
|
Reference in New Issue
Block a user