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

Unified Diff: net/tools/quic/quic_client.h

Issue 1633373002: relnote: moves ProcessPacketInterface from quic_dispatcher.h to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | net/tools/quic/quic_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client.h
diff --git a/net/tools/quic/quic_client.h b/net/tools/quic/quic_client.h
index c77b60c45e64edeb5cb96d2efabcdcc09ac3fcc4..a90da7c81c57d7f45924320acb5b4085207165ad 100644
--- a/net/tools/quic/quic_client.h
+++ b/net/tools/quic/quic_client.h
@@ -22,6 +22,7 @@
#include "net/tools/balsa/balsa_headers.h"
#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_client_base.h"
+#include "net/tools/quic/quic_packet_reader.h"
namespace net {
@@ -37,7 +38,8 @@ class QuicClientPeer;
class QuicClient : public QuicClientBase,
public EpollCallbackInterface,
- public QuicSpdyStream::Visitor {
+ public QuicSpdyStream::Visitor,
+ public ProcessPacketInterface {
public:
class ResponseListener {
public:
@@ -174,8 +176,15 @@ class QuicClient : public QuicClientBase,
const std::string& latest_response_body() const;
const std::string& latest_response_trailers() const;
+ // Implements ProcessPacketInterface. This will be called for each received
+ // packet.
+ void ProcessPacket(const IPEndPoint& self_address,
+ const IPEndPoint& peer_address,
+ const QuicEncryptedPacket& packet) override;
+
protected:
virtual QuicPacketWriter* CreateQuicPacketWriter();
+ virtual QuicPacketReader* CreateQuicPacketReader();
virtual int ReadPacket(char* buffer,
int buffer_len,
@@ -231,6 +240,11 @@ class QuicClient : public QuicClientBase,
// Read a UDP packet and hand it to the framer.
bool ReadAndProcessPacket();
+ // Read available UDP packets up to kNumPacketsPerReadCall
+ // and hand them to the connection.
+ // TODO(rtenneti): Add support for ReadAndProcessPackets().
+ // bool ReadAndProcessPackets();
+
// Address of the server.
const IPEndPoint server_address_;
@@ -278,6 +292,10 @@ class QuicClient : public QuicClientBase,
// must be resent upon a subsequent successful connection.
std::vector<QuicDataToResend*> data_to_resend_on_connect_;
+ // Point to a QuicPacketReader object on the heap. The reader allocates more
+ // space than allowed on the stack.
+ scoped_ptr<QuicPacketReader> packet_reader_;
+
DISALLOW_COPY_AND_ASSIGN(QuicClient);
};
« no previous file with comments | « no previous file | net/tools/quic/quic_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698