| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 } | 202 } |
| 203 | 203 |
| 204 // Needed by DtlsTransport. | 204 // Needed by DtlsTransport. |
| 205 TransportChannelImpl* channel() { return channel_; } | 205 TransportChannelImpl* channel() { return channel_; } |
| 206 | 206 |
| 207 private: | 207 private: |
| 208 void OnReadableState(TransportChannel* channel); | 208 void OnReadableState(TransportChannel* channel); |
| 209 void OnWritableState(TransportChannel* channel); | 209 void OnWritableState(TransportChannel* channel); |
| 210 void OnReadPacket(TransportChannel* channel, const char* data, size_t size, | 210 void OnReadPacket(TransportChannel* channel, const char* data, size_t size, |
| 211 const rtc::PacketTime& packet_time, int flags); | 211 const rtc::PacketTime& packet_time, int flags); |
| 212 void OnSentPacket(TransportChannel* channel, |
| 213 const rtc::SentPacket& sent_packet); |
| 212 void OnReadyToSend(TransportChannel* channel); | 214 void OnReadyToSend(TransportChannel* channel); |
| 213 void OnReceivingState(TransportChannel* channel); | 215 void OnReceivingState(TransportChannel* channel); |
| 214 void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err); | 216 void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err); |
| 215 bool SetupDtls(); | 217 bool SetupDtls(); |
| 216 bool MaybeStartDtls(); | 218 bool MaybeStartDtls(); |
| 217 bool HandleDtlsPacket(const char* data, size_t size); | 219 bool HandleDtlsPacket(const char* data, size_t size); |
| 218 void OnGatheringState(TransportChannelImpl* channel); | 220 void OnGatheringState(TransportChannelImpl* channel); |
| 219 void OnCandidateGathered(TransportChannelImpl* channel, const Candidate& c); | 221 void OnCandidateGathered(TransportChannelImpl* channel, const Candidate& c); |
| 220 void OnRoleConflict(TransportChannelImpl* channel); | 222 void OnRoleConflict(TransportChannelImpl* channel); |
| 221 void OnRouteChange(TransportChannel* channel, const Candidate& candidate); | 223 void OnRouteChange(TransportChannel* channel, const Candidate& candidate); |
| 222 void OnConnectionRemoved(TransportChannelImpl* channel); | 224 void OnConnectionRemoved(TransportChannelImpl* channel); |
| 223 | 225 |
| 224 Transport* transport_; // The transport_ that created us. | 226 Transport* transport_; // The transport_ that created us. |
| 225 rtc::Thread* worker_thread_; // Everything should occur on this thread. | 227 rtc::Thread* worker_thread_; // Everything should occur on this thread. |
| 226 TransportChannelImpl* channel_; // Underlying channel, owned by transport_. | 228 // Underlying channel, owned by transport_. |
| 229 TransportChannelImpl* const channel_; |
| 227 rtc::scoped_ptr<rtc::SSLStreamAdapter> dtls_; // The DTLS stream | 230 rtc::scoped_ptr<rtc::SSLStreamAdapter> dtls_; // The DTLS stream |
| 228 StreamInterfaceChannel* downward_; // Wrapper for channel_, owned by dtls_. | 231 StreamInterfaceChannel* downward_; // Wrapper for channel_, owned by dtls_. |
| 229 std::vector<std::string> srtp_ciphers_; // SRTP ciphers to use with DTLS. | 232 std::vector<std::string> srtp_ciphers_; // SRTP ciphers to use with DTLS. |
| 230 State dtls_state_; | 233 State dtls_state_; |
| 231 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; | 234 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; |
| 232 rtc::SSLRole ssl_role_; | 235 rtc::SSLRole ssl_role_; |
| 233 rtc::SSLProtocolVersion ssl_max_version_; | 236 rtc::SSLProtocolVersion ssl_max_version_; |
| 234 rtc::Buffer remote_fingerprint_value_; | 237 rtc::Buffer remote_fingerprint_value_; |
| 235 std::string remote_fingerprint_algorithm_; | 238 std::string remote_fingerprint_algorithm_; |
| 236 | 239 |
| 237 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportChannelWrapper); | 240 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportChannelWrapper); |
| 238 }; | 241 }; |
| 239 | 242 |
| 240 } // namespace cricket | 243 } // namespace cricket |
| 241 | 244 |
| 242 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ | 245 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ |
| OLD | NEW |