| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A client specific QuicSession subclass. This class owns the underlying | 5 // A client specific QuicSession subclass. This class owns the underlying |
| 6 // QuicConnection and QuicConnectionHelper objects. The connection stores | 6 // QuicConnection and QuicConnectionHelper objects. The connection stores |
| 7 // a non-owning pointer to the helper so this session needs to ensure that | 7 // a non-owning pointer to the helper so this session needs to ensure that |
| 8 // the helper outlives the connection. | 8 // the helper outlives the connection. |
| 9 | 9 |
| 10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ | 10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 QuicStreamFactory* stream_factory); | 31 QuicStreamFactory* stream_factory); |
| 32 | 32 |
| 33 virtual ~QuicClientSession(); | 33 virtual ~QuicClientSession(); |
| 34 | 34 |
| 35 // QuicSession methods: | 35 // QuicSession methods: |
| 36 virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE; | 36 virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE; |
| 37 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; | 37 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; |
| 38 virtual void CloseStream(QuicStreamId stream_id) OVERRIDE; | 38 virtual void CloseStream(QuicStreamId stream_id) OVERRIDE; |
| 39 virtual void OnCryptoHandshakeComplete(QuicErrorCode error) OVERRIDE; | 39 virtual void OnCryptoHandshakeComplete(QuicErrorCode error) OVERRIDE; |
| 40 | 40 |
| 41 // Perform a crypto handshake with the server. | 41 // Performs a crypto handshake with the server. |
| 42 int CryptoConnect(const CompletionCallback& callback); | 42 int CryptoConnect(const CompletionCallback& callback); |
| 43 | 43 |
| 44 // Causes the QuicConnectionHelper to start reading from the socket | 44 // Causes the QuicConnectionHelper to start reading from the socket |
| 45 // and passing the data along to the QuicConnection. | 45 // and passing the data along to the QuicConnection. |
| 46 void StartReading(); | 46 void StartReading(); |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 // QuicSession methods: | 49 // QuicSession methods: |
| 50 virtual ReliableQuicStream* CreateIncomingReliableStream( | 50 virtual ReliableQuicStream* CreateIncomingReliableStream( |
| 51 QuicStreamId id) OVERRIDE; | 51 QuicStreamId id) OVERRIDE; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 64 scoped_refptr<IOBufferWithSize> read_buffer_; | 64 scoped_refptr<IOBufferWithSize> read_buffer_; |
| 65 bool read_pending_; | 65 bool read_pending_; |
| 66 CompletionCallback callback_; | 66 CompletionCallback callback_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 68 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace net | 71 } // namespace net |
| 72 | 72 |
| 73 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ | 73 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ |
| OLD | NEW |