Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1006)

Unified Diff: net/quic/test_tools/quic_test_packet_maker.cc

Issue 1775283002: [Domain Reliabiliy: net stack] Plumb received go away from server due to connection migration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove conditional assignment Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/quic_test_packet_maker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_packet_maker.cc
diff --git a/net/quic/test_tools/quic_test_packet_maker.cc b/net/quic/test_tools/quic_test_packet_maker.cc
index ebd2021573b682a2d29cabd1d65541ed980429fd..0bb671cee72c4c027275e7eafbda2635fa7c3971 100644
--- a/net/quic/test_tools/quic_test_packet_maker.cc
+++ b/net/quic/test_tools/quic_test_packet_maker.cc
@@ -190,6 +190,28 @@ scoped_ptr<QuicEncryptedPacket> QuicTestPacketMaker::MakeConnectionClosePacket(
return scoped_ptr<QuicEncryptedPacket>(MakePacket(header, QuicFrame(&close)));
}
+scoped_ptr<QuicEncryptedPacket> QuicTestPacketMaker::MakeGoAwayPacket(
+ QuicPacketNumber num,
+ QuicErrorCode error_code,
+ std::string reason_phrase) {
+ QuicPacketHeader header;
+ header.public_header.connection_id = connection_id_;
+ header.public_header.reset_flag = false;
+ header.public_header.version_flag = false;
+ header.public_header.packet_number_length = PACKET_1BYTE_PACKET_NUMBER;
+ header.packet_number = num;
+ header.entropy_flag = false;
+ header.fec_flag = false;
+ header.fec_group = 0;
+
+ QuicGoAwayFrame goaway;
+ goaway.error_code = error_code;
+ goaway.last_good_stream_id = 0;
+ goaway.reason_phrase = reason_phrase;
+ return scoped_ptr<QuicEncryptedPacket>(
+ MakePacket(header, QuicFrame(&goaway)));
+}
+
// Sets both least_unacked fields in stop waiting frame and ack frame
// to be |least_unacked|.
scoped_ptr<QuicEncryptedPacket> QuicTestPacketMaker::MakeAckPacket(
« no previous file with comments | « net/quic/test_tools/quic_test_packet_maker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698