Chromium Code Reviews| Index: net/quic/quic_chromium_client_session.h |
| diff --git a/net/quic/quic_chromium_client_session.h b/net/quic/quic_chromium_client_session.h |
| index 9cae22c02d7d972f53e16b18a676f451dece295d..c2a64b8fa59760eead552b5987c6a194f6beab05 100644 |
| --- a/net/quic/quic_chromium_client_session.h |
| +++ b/net/quic/quic_chromium_client_session.h |
| @@ -188,7 +188,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession |
| // Resumes a crypto handshake with the server after a timeout. |
| int ResumeCryptoConnect(const CompletionCallback& callback); |
| - // Causes the QuicConnectionHelper to start reading from the socket |
| + // Causes the QuicConnectionHelper to start reading from all sockets |
| // and passing the data along to the QuicConnection. |
| void StartReading(); |
| @@ -221,6 +221,15 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession |
| QuicDisabledReason disabled_reason() const { return disabled_reason_; } |
| + // Migrates session onto new socket, i.e., starts reading from |socket| |
| + // in addition to any previous sockets, and sets |writer| to be the new |
| + // default writer. Returns true if socket was successfully added to the |
| + // session and the session was successfully migrated to using the new socket. |
| + // Takes ownership of |socket|, |reader|, and |writer|. |
|
Ryan Hamilton
2015/11/17 04:57:27
Can you explain why this method would return false
Jana
2015/11/18 04:31:41
Done.
|
| + bool MigrateToSocket(scoped_ptr<DatagramClientSocket> socket, |
| + QuicPacketReader* reader, |
|
Ryan Hamilton
2015/11/17 04:57:28
Since |reader| and writer are not scoped_ptrs, are
Jana
2015/11/18 04:31:41
Good suggestion. Done.
|
| + QuicPacketWriter* writer); |
| + |
| protected: |
| // QuicSession methods: |
| QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; |
| @@ -270,7 +279,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession |
| bool require_confirmation_; |
| scoped_ptr<QuicCryptoClientStream> crypto_stream_; |
| QuicStreamFactory* stream_factory_; |
| - scoped_ptr<DatagramClientSocket> socket_; |
| + std::vector<scoped_ptr<DatagramClientSocket>> sockets_; |
| TransportSecurityState* transport_security_state_; |
| scoped_ptr<QuicServerInfo> server_info_; |
| scoped_ptr<CertVerifyResult> cert_verify_result_; |
| @@ -281,7 +290,7 @@ class NET_EXPORT_PRIVATE QuicChromiumClientSession |
| size_t num_total_streams_; |
| base::TaskRunner* task_runner_; |
| BoundNetLog net_log_; |
| - QuicPacketReader packet_reader_; |
| + std::vector<scoped_ptr<QuicPacketReader>> packet_readers_; |
| base::TimeTicks dns_resolution_end_time_; |
| base::TimeTicks handshake_start_; // Time the handshake was started. |
| scoped_ptr<QuicConnectionLogger> logger_; |