| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2  *  Copyright 2016 The WebRTC Project Authors. All rights reserved. | 
| 3  * | 3  * | 
| 4  *  Use of this source code is governed by a BSD-style license | 4  *  Use of this source code is governed by a BSD-style license | 
| 5  *  that can be found in the LICENSE file in the root of the source | 5  *  that can be found in the LICENSE file in the root of the source | 
| 6  *  tree. An additional intellectual property rights grant can be found | 6  *  tree. An additional intellectual property rights grant can be found | 
| 7  *  in the file PATENTS.  All contributing project authors may | 7  *  in the file PATENTS.  All contributing project authors may | 
| 8  *  be found in the AUTHORS file in the root of the source tree. | 8  *  be found in the AUTHORS file in the root of the source tree. | 
| 9  */ | 9  */ | 
| 10 | 10 | 
| 11 #ifndef WEBRTC_P2P_QUIC_QUICSESSION_H_ | 11 #ifndef WEBRTC_P2P_QUIC_QUICSESSION_H_ | 
| 12 #define WEBRTC_P2P_QUIC_QUICSESSION_H_ | 12 #define WEBRTC_P2P_QUIC_QUICSESSION_H_ | 
| 13 | 13 | 
|  | 14 #include <memory> | 
| 14 #include <string> | 15 #include <string> | 
| 15 | 16 | 
| 16 #include "net/quic/quic_crypto_client_stream.h" | 17 #include "net/quic/quic_crypto_client_stream.h" | 
| 17 #include "net/quic/quic_crypto_server_stream.h" | 18 #include "net/quic/quic_crypto_server_stream.h" | 
| 18 #include "net/quic/quic_crypto_stream.h" | 19 #include "net/quic/quic_crypto_stream.h" | 
| 19 #include "net/quic/quic_session.h" | 20 #include "net/quic/quic_session.h" | 
| 20 #include "webrtc/base/constructormagic.h" | 21 #include "webrtc/base/constructormagic.h" | 
| 21 #include "webrtc/base/sigslot.h" | 22 #include "webrtc/base/sigslot.h" | 
| 22 #include "webrtc/base/sslidentity.h" | 23 #include "webrtc/base/sslidentity.h" | 
| 23 #include "webrtc/p2p/quic/reliablequicstream.h" | 24 #include "webrtc/p2p/quic/reliablequicstream.h" | 
| 24 | 25 | 
| 25 namespace cricket { | 26 namespace cricket { | 
| 26 | 27 | 
| 27 // This class provides a QUIC session over peer-to-peer transport that | 28 // This class provides a QUIC session over peer-to-peer transport that | 
| 28 // negotiates the crypto handshake (using QuicCryptoHandshake) and provides | 29 // negotiates the crypto handshake (using QuicCryptoHandshake) and provides | 
| 29 // reading/writing of data using QUIC packets. | 30 // reading/writing of data using QUIC packets. | 
| 30 class QuicSession : public net::QuicSession, public sigslot::has_slots<> { | 31 class QuicSession : public net::QuicSession, public sigslot::has_slots<> { | 
| 31  public: | 32  public: | 
| 32   QuicSession(rtc::scoped_ptr<net::QuicConnection> connection, | 33   QuicSession(std::unique_ptr<net::QuicConnection> connection, | 
| 33               const net::QuicConfig& config); | 34               const net::QuicConfig& config); | 
| 34   ~QuicSession() override; | 35   ~QuicSession() override; | 
| 35 | 36 | 
| 36   // Initiates client crypto handshake by sending client hello. | 37   // Initiates client crypto handshake by sending client hello. | 
| 37   void StartClientHandshake(net::QuicCryptoClientStream* crypto_stream); | 38   void StartClientHandshake(net::QuicCryptoClientStream* crypto_stream); | 
| 38 | 39 | 
| 39   // Responds to a client who has inititated the crypto handshake. | 40   // Responds to a client who has inititated the crypto handshake. | 
| 40   void StartServerHandshake(net::QuicCryptoServerStream* crypto_stream); | 41   void StartServerHandshake(net::QuicCryptoServerStream* crypto_stream); | 
| 41 | 42 | 
| 42   // QuicSession overrides. | 43   // QuicSession overrides. | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 75   // Sets the QUIC crypto stream and takes ownership of it. | 76   // Sets the QUIC crypto stream and takes ownership of it. | 
| 76   void SetCryptoStream(net::QuicCryptoStream* crypto_stream); | 77   void SetCryptoStream(net::QuicCryptoStream* crypto_stream); | 
| 77 | 78 | 
| 78   // QuicSession override. | 79   // QuicSession override. | 
| 79   ReliableQuicStream* CreateIncomingDynamicStream( | 80   ReliableQuicStream* CreateIncomingDynamicStream( | 
| 80       net::QuicStreamId id) override; | 81       net::QuicStreamId id) override; | 
| 81 | 82 | 
| 82   virtual ReliableQuicStream* CreateDataStream(net::QuicStreamId id); | 83   virtual ReliableQuicStream* CreateDataStream(net::QuicStreamId id); | 
| 83 | 84 | 
| 84  private: | 85  private: | 
| 85   rtc::scoped_ptr<net::QuicCryptoStream> crypto_stream_; | 86   std::unique_ptr<net::QuicCryptoStream> crypto_stream_; | 
| 86 | 87 | 
| 87   RTC_DISALLOW_COPY_AND_ASSIGN(QuicSession); | 88   RTC_DISALLOW_COPY_AND_ASSIGN(QuicSession); | 
| 88 }; | 89 }; | 
| 89 | 90 | 
| 90 }  // namespace cricket | 91 }  // namespace cricket | 
| 91 | 92 | 
| 92 #endif  // WEBRTC_P2P_QUIC_QUICSESSION_H_ | 93 #endif  // WEBRTC_P2P_QUIC_QUICSESSION_H_ | 
| OLD | NEW | 
|---|