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

Side by Side Diff: webrtc/p2p/quic/quicsession.h

Issue 1886623002: Add QuicDataChannel and QuicDataTransport classes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Make QuicDataChannel::Message public so QuicDataTransport can use it for handling messages Created 4 years, 7 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 /* 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
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return crypto_stream_.get(); 44 return crypto_stream_.get();
45 } 45 }
46 ReliableQuicStream* CreateOutgoingDynamicStream( 46 ReliableQuicStream* CreateOutgoingDynamicStream(
47 net::SpdyPriority priority) override; 47 net::SpdyPriority priority) override;
48 48
49 // QuicSession optional overrides. 49 // QuicSession optional overrides.
50 void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override; 50 void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
51 51
52 // QuicConnectionVisitorInterface overrides. 52 // QuicConnectionVisitorInterface overrides.
53 void OnConnectionClosed(net::QuicErrorCode error, 53 void OnConnectionClosed(net::QuicErrorCode error,
54 const std::string& error_details,
54 net::ConnectionCloseSource source) override; 55 net::ConnectionCloseSource source) override;
55 56
56 // Exports keying material for SRTP. 57 // Exports keying material for SRTP.
57 bool ExportKeyingMaterial(base::StringPiece label, 58 bool ExportKeyingMaterial(base::StringPiece label,
58 base::StringPiece context, 59 base::StringPiece context,
59 size_t result_len, 60 size_t result_len,
60 string* result); 61 std::string* result);
61 62
62 // Decrypts an incoming QUIC packet to a data stream. 63 // Decrypts an incoming QUIC packet to a data stream.
63 bool OnReadPacket(const char* data, size_t data_len); 64 bool OnReadPacket(const char* data, size_t data_len);
64 65
65 // Called when peers have established forward-secure encryption 66 // Called when peers have established forward-secure encryption
66 sigslot::signal0<> SignalHandshakeComplete; 67 sigslot::signal0<> SignalHandshakeComplete;
67 // Called when connection closes locally, or remotely by peer. 68 // Called when connection closes locally, or remotely by peer.
68 sigslot::signal2<net::QuicErrorCode, bool> SignalConnectionClosed; 69 sigslot::signal2<net::QuicErrorCode, bool> SignalConnectionClosed;
69 // Called when an incoming QUIC stream is created so we can process data 70 // Called when an incoming QUIC stream is created so we can process data
70 // from it by registering a listener to 71 // from it by registering a listener to
71 // ReliableQuicStream::SignalDataReceived. 72 // ReliableQuicStream::SignalDataReceived.
72 sigslot::signal1<ReliableQuicStream*> SignalIncomingStream; 73 sigslot::signal1<ReliableQuicStream*> SignalIncomingStream;
73 74
74 protected: 75 protected:
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 rtc::scoped_ptr<net::QuicCryptoStream> crypto_stream_;
87 net::QuicClock clock_; // For recording packet receipt time
86 88
87 RTC_DISALLOW_COPY_AND_ASSIGN(QuicSession); 89 RTC_DISALLOW_COPY_AND_ASSIGN(QuicSession);
88 }; 90 };
89 91
90 } // namespace cricket 92 } // namespace cricket
91 93
92 #endif // WEBRTC_P2P_QUIC_QUICSESSION_H_ 94 #endif // WEBRTC_P2P_QUIC_QUICSESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698