| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 channel_->RemoveRemoteCandidate(candidate); | 186 channel_->RemoveRemoteCandidate(candidate); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void SetIceConfig(const IceConfig& config) override { | 189 void SetIceConfig(const IceConfig& config) override { |
| 190 channel_->SetIceConfig(config); | 190 channel_->SetIceConfig(config); |
| 191 } | 191 } |
| 192 | 192 |
| 193 // Needed by DtlsTransport. | 193 // Needed by DtlsTransport. |
| 194 TransportChannelImpl* channel() { return channel_; } | 194 TransportChannelImpl* channel() { return channel_; } |
| 195 | 195 |
| 196 // For informational purposes. Tells if the DTLS handshake has finished. | |
| 197 // This may be true even if writable() is false, if the remote fingerprint | |
| 198 // has not yet been verified. | |
| 199 bool IsDtlsConnected(); | |
| 200 | |
| 201 private: | 196 private: |
| 197 void OnReadableState(TransportChannel* channel); |
| 202 void OnWritableState(TransportChannel* channel); | 198 void OnWritableState(TransportChannel* channel); |
| 203 void OnReadPacket(TransportChannel* channel, const char* data, size_t size, | 199 void OnReadPacket(TransportChannel* channel, const char* data, size_t size, |
| 204 const rtc::PacketTime& packet_time, int flags); | 200 const rtc::PacketTime& packet_time, int flags); |
| 205 void OnSentPacket(TransportChannel* channel, | 201 void OnSentPacket(TransportChannel* channel, |
| 206 const rtc::SentPacket& sent_packet); | 202 const rtc::SentPacket& sent_packet); |
| 207 void OnReadyToSend(TransportChannel* channel); | 203 void OnReadyToSend(TransportChannel* channel); |
| 208 void OnReceivingState(TransportChannel* channel); | 204 void OnReceivingState(TransportChannel* channel); |
| 209 void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err); | 205 void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err); |
| 210 bool SetupDtls(); | 206 bool SetupDtls(); |
| 211 void MaybeStartDtls(); | 207 void MaybeStartDtls(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 242 // transport channel became writable, or before a remote fingerprint was | 238 // transport channel became writable, or before a remote fingerprint was |
| 243 // received. | 239 // received. |
| 244 rtc::Buffer cached_client_hello_; | 240 rtc::Buffer cached_client_hello_; |
| 245 | 241 |
| 246 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportChannelWrapper); | 242 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportChannelWrapper); |
| 247 }; | 243 }; |
| 248 | 244 |
| 249 } // namespace cricket | 245 } // namespace cricket |
| 250 | 246 |
| 251 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ | 247 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ |
| OLD | NEW |