scw00 commented on a change in pull request #6836:
URL: https://github.com/apache/trafficserver/pull/6836#discussion_r432803003
##########
File path: iocore/net/quic/QUICLogFrame.h
##########
@@ -0,0 +1,286 @@
+#pragma once
+
+#include <memory>
+#include <yaml-cpp/yaml.h>
+
+#include "QUICFrame.h"
+
+namespace QLog
+{
+class QLogFrame
+{
+public:
+ QLogFrame(QUICFrameType type) : _type(type) {}
+ virtual ~QLogFrame() {}
+
+ QUICFrameType
+ type() const
+ {
+ return this->_type;
+ }
+
+ // encode frame into YAML stype
+ virtual void encode(YAML::Node &node) = 0;
+
+protected:
+ QUICFrameType _type = QUICFrameType::UNKNOWN;
+};
+
+using QLogFrameUPtr = std::unique_ptr<QLogFrame>;
+
+//
+// convert QUICFrame to QLogFrame
+//
+class QLogFrameFactory
+{
+public:
+ // create QLogFrame
+ static QLogFrameUPtr create(QUICFrame &frame);
+};
+
+namespace Frame
+{
+ struct AckFrame : public QLogFrame {
+ AckFrame(QUICAckFrame &frame) : QLogFrame(frame.type())
Review comment:
Can it use QUICFrame ? Now, we have QUICFrame QUICFrameInfo, QLogFrame
these three are implementation for the same thing .
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]