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

Unified Diff: net/tools/quic/quic_packet_writer_wrapper.cc

Issue 131743009: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use size_t instead of int to fix win_x64 compile error Created 6 years, 11 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/tools/quic/quic_packet_writer_wrapper.h ('k') | net/tools/quic/quic_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_packet_writer_wrapper.cc
diff --git a/net/tools/quic/quic_packet_writer_wrapper.cc b/net/tools/quic/quic_packet_writer_wrapper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f124b6b4ac1174f7794b6d7db6ef0f460a76c019
--- /dev/null
+++ b/net/tools/quic/quic_packet_writer_wrapper.cc
@@ -0,0 +1,50 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/tools/quic/quic_packet_writer_wrapper.h"
+
+#include "net/quic/quic_protocol.h"
+
+namespace net {
+namespace tools {
+
+QuicPacketWriterWrapper::QuicPacketWriterWrapper() {}
+
+QuicPacketWriterWrapper::QuicPacketWriterWrapper(QuicPacketWriter* writer)
+ : writer_(writer) {}
+
+QuicPacketWriterWrapper::~QuicPacketWriterWrapper() {}
+
+WriteResult QuicPacketWriterWrapper::WritePacket(
+ const char* buffer,
+ size_t buf_len,
+ const net::IPAddressNumber& self_address,
+ const net::IPEndPoint& peer_address,
+ QuicBlockedWriterInterface* blocked_writer) {
+ return writer_->WritePacket(
+ buffer, buf_len, self_address, peer_address, blocked_writer);
+}
+
+bool QuicPacketWriterWrapper::IsWriteBlockedDataBuffered() const {
+ return writer_->IsWriteBlockedDataBuffered();
+}
+
+bool QuicPacketWriterWrapper::IsWriteBlocked() const {
+ return writer_->IsWriteBlocked();
+}
+
+void QuicPacketWriterWrapper::SetWritable() {
+ writer_->SetWritable();
+}
+
+void QuicPacketWriterWrapper::set_writer(QuicPacketWriter* writer) {
+ writer_.reset(writer);
+}
+
+QuicPacketWriter* QuicPacketWriterWrapper::release_writer() {
+ return writer_.release();
+}
+
+} // namespace tools
+} // namespace net
« no previous file with comments | « net/tools/quic/quic_packet_writer_wrapper.h ('k') | net/tools/quic/quic_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698