1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-10 21:22:20 +03:00
Files
mvfst/quic/logging/BaseQLogger.h
Aman Sharma 4a7ddd92af Add "RetryPacket" QLogger event
Summary:
This adds a QLog event for Retry packets. There are three fields:
- packetType: This is always "RETRY"
- packetSize: The size of the entire packet
- tokenSize: The size of the retry token

Reviewed By: mjoras

Differential Revision: D20910017

fbshipit-source-id: feb4abbf0d15ff7b24fd11f00634e9da84bf8333
2020-04-21 13:40:53 -07:00

44 lines
1.2 KiB
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
#pragma once
#include <quic/logging/QLogger.h>
#include <quic/logging/QLoggerConstants.h>
#include <quic/logging/QLoggerTypes.h>
namespace quic {
class BaseQLogger : public QLogger {
public:
explicit BaseQLogger(VantagePoint vantagePointIn, std::string protocolTypeIn)
: QLogger(vantagePointIn, std::move(protocolTypeIn)) {}
~BaseQLogger() override = default;
protected:
std::unique_ptr<QLogPacketEvent> createPacketEvent(
const RegularQuicPacket& regularPacket,
uint64_t packetSize);
std::unique_ptr<QLogPacketEvent> createPacketEvent(
const RegularQuicWritePacket& writePacket,
uint64_t packetSize);
std::unique_ptr<QLogVersionNegotiationEvent> createPacketEvent(
const VersionNegotiationPacket& versionPacket,
uint64_t packetSize,
bool isPacketRecvd);
std::unique_ptr<QLogRetryEvent> createPacketEvent(
const RetryPacket& retryPacket,
uint64_t packetSize,
bool isPacketRecvd);
};
} // namespace quic