You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/08/16 07:00:59 UTC
[trafficserver] branch quic-latest updated: Add MAX_DATA,
MAX_STREAM_DATA, BLOCKED, and STREAM_BLOCKED frame factory
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/quic-latest by this push:
new 31ca4fa Add MAX_DATA, MAX_STREAM_DATA, BLOCKED, and STREAM_BLOCKED frame factory
31ca4fa is described below
commit 31ca4fa14c9d007f5a16645da4a01fb1040cb4b0
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Aug 16 15:56:00 2017 +0900
Add MAX_DATA, MAX_STREAM_DATA, BLOCKED, and STREAM_BLOCKED frame factory
---
iocore/net/quic/QUICFrame.cc | 32 ++++++++++++++++++++++++++++++++
iocore/net/quic/QUICFrame.h | 21 +++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/iocore/net/quic/QUICFrame.cc b/iocore/net/quic/QUICFrame.cc
index cf36199..f0c0b5b 100644
--- a/iocore/net/quic/QUICFrame.cc
+++ b/iocore/net/quic/QUICFrame.cc
@@ -1301,6 +1301,38 @@ QUICFrameFactory::create_connection_close_frame(QUICErrorCode error_code, uint16
return std::unique_ptr<QUICConnectionCloseFrame, QUICFrameDeleterFunc>(frame, &QUICFrameDeleter::delete_connection_close_frame);
}
+std::unique_ptr<QUICMaxDataFrame, QUICFrameDeleterFunc>
+QUICFrameFactory::create_max_data_frame(uint64_t maximum_data)
+{
+ QUICMaxDataFrame *frame = quicMaxDataFrameAllocator.alloc();
+ new (frame) QUICMaxDataFrame(maximum_data);
+ return std::unique_ptr<QUICMaxDataFrame, QUICFrameDeleterFunc>(frame, &QUICFrameDeleter::delete_max_data_frame);
+}
+
+std::unique_ptr<QUICMaxStreamDataFrame, QUICFrameDeleterFunc>
+QUICFrameFactory::create_max_stream_data_frame(QUICStreamId stream_id, uint64_t maximum_data)
+{
+ QUICMaxStreamDataFrame *frame = quicMaxStreamDataFrameAllocator.alloc();
+ new (frame) QUICMaxStreamDataFrame(stream_id, maximum_data);
+ return std::unique_ptr<QUICMaxStreamDataFrame, QUICFrameDeleterFunc>(frame, &QUICFrameDeleter::delete_max_stream_data_frame);
+}
+
+std::unique_ptr<QUICBlockedFrame, QUICFrameDeleterFunc>
+QUICFrameFactory::create_blocked_frame()
+{
+ QUICBlockedFrame *frame = quicBlockedFrameAllocator.alloc();
+ new (frame) QUICBlockedFrame();
+ return std::unique_ptr<QUICBlockedFrame, QUICFrameDeleterFunc>(frame, &QUICFrameDeleter::delete_blocked_frame);
+}
+
+std::unique_ptr<QUICStreamBlockedFrame, QUICFrameDeleterFunc>
+QUICFrameFactory::create_stream_blocked_frame(QUICStreamId stream_id)
+{
+ QUICStreamBlockedFrame *frame = quicStreamBlockedFrameAllocator.alloc();
+ new (frame) QUICStreamBlockedFrame(stream_id);
+ return std::unique_ptr<QUICStreamBlockedFrame, QUICFrameDeleterFunc>(frame, &QUICFrameDeleter::delete_stream_blocked_frame);
+}
+
std::unique_ptr<QUICRetransmissionFrame, QUICFrameDeleterFunc>
QUICFrameFactory::create_retransmission_frame(std::unique_ptr<QUICFrame, QUICFrameDeleterFunc> original_frame,
const QUICPacket &original_packet)
diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h
index 2e87d4f..8be22bf 100644
--- a/iocore/net/quic/QUICFrame.h
+++ b/iocore/net/quic/QUICFrame.h
@@ -604,6 +604,27 @@ public:
QUICErrorCode error_code, uint16_t reason_phrase_length, const char *reason_phrase);
/*
+ * Creates a MAX_DATA frame.
+ */
+ static std::unique_ptr<QUICMaxDataFrame, QUICFrameDeleterFunc> create_max_data_frame(uint64_t maximum_data);
+
+ /*
+ * Creates a MAX_STREAM_DATA frame.
+ */
+ static std::unique_ptr<QUICMaxStreamDataFrame, QUICFrameDeleterFunc> create_max_stream_data_frame(QUICStreamId stream_id,
+ uint64_t maximum_stream_data);
+
+ /*
+ * Creates a BLOCKED frame.
+ */
+ static std::unique_ptr<QUICBlockedFrame, QUICFrameDeleterFunc> create_blocked_frame();
+
+ /*
+ * Creates a STREAM_BLOCKED frame.
+ */
+ static std::unique_ptr<QUICStreamBlockedFrame, QUICFrameDeleterFunc> create_stream_blocked_frame(QUICStreamId stream_id);
+
+ /*
* Creates a retransmission frame, which is very special.
* This retransmission frame will be used only for retransmission and it's not a standard frame type.
*/
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].