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 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 205 |
206 // Returns true if |quic_| has queued data which wasn't written due | 206 // Returns true if |quic_| has queued data which wasn't written due |
207 // to |channel_| being write blocked. | 207 // to |channel_| being write blocked. |
208 bool HasDataToWrite() const; | 208 bool HasDataToWrite() const; |
209 // Writes queued data for |quic_| when |channel_| is no longer write blocked. | 209 // Writes queued data for |quic_| when |channel_| is no longer write blocked. |
210 void OnCanWrite(); | 210 void OnCanWrite(); |
211 // Connectivity state of QuicTransportChannel. | 211 // Connectivity state of QuicTransportChannel. |
212 QuicTransportState quic_state() const { return quic_state_; } | 212 QuicTransportState quic_state() const { return quic_state_; } |
213 // Creates a new QUIC stream that can send data. | 213 // Creates a new QUIC stream that can send data. |
214 ReliableQuicStream* CreateQuicStream(); | 214 ReliableQuicStream* CreateQuicStream(); |
| 215 // Needed by QuicTransport. |
| 216 TransportChannelImpl* channel() const { return channel_; } |
215 | 217 |
216 // Emitted when |quic_| creates a QUIC stream to receive data from the remote | 218 // Emitted when |quic_| creates a QUIC stream to receive data from the remote |
217 // peer, when the stream did not exist previously. | 219 // peer, when the stream did not exist previously. |
218 sigslot::signal1<ReliableQuicStream*> SignalIncomingStream; | 220 sigslot::signal1<ReliableQuicStream*> SignalIncomingStream; |
219 // Emitted when the QuicTransportChannel state becomes QUIC_TRANSPORT_CLOSED. | 221 // Emitted when the QuicTransportChannel state becomes QUIC_TRANSPORT_CLOSED. |
220 sigslot::signal0<> SignalClosed; | 222 sigslot::signal0<> SignalClosed; |
221 | 223 |
222 private: | 224 private: |
223 // Fingerprint of remote peer. | 225 // Fingerprint of remote peer. |
224 struct RemoteFingerprint { | 226 struct RemoteFingerprint { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; | 296 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; |
295 // Fingerprint of the remote peer. This must be set before we start QUIC. | 297 // Fingerprint of the remote peer. This must be set before we start QUIC. |
296 rtc::Optional<RemoteFingerprint> remote_fingerprint_; | 298 rtc::Optional<RemoteFingerprint> remote_fingerprint_; |
297 | 299 |
298 RTC_DISALLOW_COPY_AND_ASSIGN(QuicTransportChannel); | 300 RTC_DISALLOW_COPY_AND_ASSIGN(QuicTransportChannel); |
299 }; | 301 }; |
300 | 302 |
301 } // namespace cricket | 303 } // namespace cricket |
302 | 304 |
303 #endif // WEBRTC_P2P_QUIC_QUICTRANSPORTCHANNEL_H_ | 305 #endif // WEBRTC_P2P_QUIC_QUICTRANSPORTCHANNEL_H_ |
OLD | NEW |