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

Side by Side Diff: net/tools/quic/quic_simple_per_connection_packet_writer.h

Issue 1660533002: Landing Recent QUIC changes until 01/26/2016 18:14 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_TOOLS_QUIC_SIMPLE_PER_CONNECTION_PACKET_WRITER_H_ 5 #ifndef NET_QUIC_TOOLS_QUIC_SIMPLE_PER_CONNECTION_PACKET_WRITER_H_
6 #define NET_QUIC_TOOLS_QUIC_SIMPLE_PER_CONNECTION_PACKET_WRITER_H_ 6 #define NET_QUIC_TOOLS_QUIC_SIMPLE_PER_CONNECTION_PACKET_WRITER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 29
30 QuicPacketWriter* shared_writer() const; 30 QuicPacketWriter* shared_writer() const;
31 void set_connection(QuicConnection* connection) { connection_ = connection; } 31 void set_connection(QuicConnection* connection) { connection_ = connection; }
32 QuicConnection* connection() const { return connection_; } 32 QuicConnection* connection() const { return connection_; }
33 33
34 // Default implementation of the QuicPacketWriter interface: Passes everything 34 // Default implementation of the QuicPacketWriter interface: Passes everything
35 // to |shared_writer_|. 35 // to |shared_writer_|.
36 WriteResult WritePacket(const char* buffer, 36 WriteResult WritePacket(const char* buffer,
37 size_t buf_len, 37 size_t buf_len,
38 const IPAddressNumber& self_address, 38 const IPAddressNumber& self_address,
39 const IPEndPoint& peer_address) override; 39 const IPEndPoint& peer_address,
40 PerPacketOptions* options) override;
40 bool IsWriteBlockedDataBuffered() const override; 41 bool IsWriteBlockedDataBuffered() const override;
41 bool IsWriteBlocked() const override; 42 bool IsWriteBlocked() const override;
42 void SetWritable() override; 43 void SetWritable() override;
43 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override; 44 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override;
44 45
45 private: 46 private:
46 void OnWriteComplete(WriteResult result); 47 void OnWriteComplete(WriteResult result);
47 48
48 QuicSimpleServerPacketWriter* shared_writer_; // Not owned. 49 QuicSimpleServerPacketWriter* shared_writer_; // Not owned.
49 QuicConnection* connection_; // Not owned. 50 QuicConnection* connection_; // Not owned.
50 51
51 base::WeakPtrFactory<QuicSimplePerConnectionPacketWriter> weak_factory_; 52 base::WeakPtrFactory<QuicSimplePerConnectionPacketWriter> weak_factory_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(QuicSimplePerConnectionPacketWriter); 54 DISALLOW_COPY_AND_ASSIGN(QuicSimplePerConnectionPacketWriter);
54 }; 55 };
55 56
56 } // namespace net 57 } // namespace net
57 58
58 #endif // NET_QUIC_TOOLS_QUIC_SIMPLE_PER_CONNECTION_PACKET_WRITER_H_ 59 #endif // NET_QUIC_TOOLS_QUIC_SIMPLE_PER_CONNECTION_PACKET_WRITER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_session_base_test.cc ('k') | net/tools/quic/quic_simple_per_connection_packet_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698