mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-04-18 17:24:03 +03:00
Summary: Remove headers flagged by facebook-unused-include-check over fbcode.quic. + format and autodeps This is a codemod. It was automatically generated and will be landed once it is approved and tests are passing in sandcastle. You have been added as a reviewer by Sentinel or Butterfly. Autodiff project: uiq Autodiff partition: fbcode.quic Autodiff bookmark: ad.uiq.fbcode.quic Reviewed By: hanidamlaj Differential Revision: D69864370 fbshipit-source-id: fb8f85599e1e12429f00dc2817dfc5ecf55bc482
55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include <quic/api/QuicBatchWriterFactory.h>
|
|
|
|
namespace quic {
|
|
|
|
// BatchWriterDeleter
|
|
void BatchWriterDeleter::operator()(BatchWriter* batchWriter) {
|
|
delete batchWriter;
|
|
}
|
|
|
|
BatchWriterPtr makeGsoBatchWriter(uint32_t batchSize) {
|
|
return BatchWriterPtr(new GSOPacketBatchWriter(batchSize));
|
|
}
|
|
|
|
BatchWriterPtr makeGsoInPlaceBatchWriter(
|
|
uint32_t batchSize,
|
|
QuicConnectionStateBase& conn) {
|
|
return BatchWriterPtr(new GSOInplacePacketBatchWriter(conn, batchSize));
|
|
}
|
|
|
|
BatchWriterPtr makeSendmmsgGsoBatchWriter(uint32_t batchSize) {
|
|
return BatchWriterPtr(new SendmmsgGSOPacketBatchWriter(batchSize));
|
|
}
|
|
|
|
BatchWriterPtr makeSendmmsgInplaceGsoInplaceBatchWriter(
|
|
uint32_t batchSize,
|
|
QuicConnectionStateBase& conn) {
|
|
return BatchWriterPtr(
|
|
new SendmmsgGSOInplacePacketBatchWriter(conn, batchSize));
|
|
}
|
|
|
|
BatchWriterPtr BatchWriterFactory::makeBatchWriter(
|
|
const quic::QuicBatchingMode& batchingMode,
|
|
uint32_t batchSize,
|
|
bool enableBackpressure,
|
|
DataPathType dataPathType,
|
|
QuicConnectionStateBase& conn,
|
|
bool gsoSupported) {
|
|
return makeBatchWriterHelper(
|
|
batchingMode,
|
|
batchSize,
|
|
enableBackpressure,
|
|
dataPathType,
|
|
conn,
|
|
gsoSupported);
|
|
}
|
|
|
|
} // namespace quic
|