OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // Returns the states of this channel. Each time one of these states changes, | 73 // Returns the states of this channel. Each time one of these states changes, |
74 // a signal is raised. These states are aggregated by the TransportManager. | 74 // a signal is raised. These states are aggregated by the TransportManager. |
75 bool writable() const { return writable_; } | 75 bool writable() const { return writable_; } |
76 bool receiving() const { return receiving_; } | 76 bool receiving() const { return receiving_; } |
77 DtlsTransportState dtls_state() const { return dtls_state_; } | 77 DtlsTransportState dtls_state() const { return dtls_state_; } |
78 sigslot::signal1<TransportChannel*> SignalWritableState; | 78 sigslot::signal1<TransportChannel*> SignalWritableState; |
79 // Emitted when the TransportChannel's ability to send has changed. | 79 // Emitted when the TransportChannel's ability to send has changed. |
80 sigslot::signal1<TransportChannel*> SignalReadyToSend; | 80 sigslot::signal1<TransportChannel*> SignalReadyToSend; |
81 sigslot::signal1<TransportChannel*> SignalReceivingState; | 81 sigslot::signal1<TransportChannel*> SignalReceivingState; |
82 // Emitted when the DtlsTransportState has changed. | 82 // Emitted whenever DTLS-SRTP is setup which will require setting up a new |
83 sigslot::signal1<TransportChannel*> SignalDtlsState; | 83 // SRTP context. |
| 84 sigslot::signal2<TransportChannel*, DtlsTransportState> SignalDtlsState; |
84 | 85 |
85 // Attempts to send the given packet. The return value is < 0 on failure. | 86 // Attempts to send the given packet. The return value is < 0 on failure. |
86 // TODO: Remove the default argument once channel code is updated. | 87 // TODO: Remove the default argument once channel code is updated. |
87 virtual int SendPacket(const char* data, size_t len, | 88 virtual int SendPacket(const char* data, size_t len, |
88 const rtc::PacketOptions& options, | 89 const rtc::PacketOptions& options, |
89 int flags = 0) = 0; | 90 int flags = 0) = 0; |
90 | 91 |
91 // Sets a socket option on this channel. Note that not all options are | 92 // Sets a socket option on this channel. Note that not all options are |
92 // supported by all transport types. | 93 // supported by all transport types. |
93 virtual int SetOption(rtc::Socket::Option opt, int value) = 0; | 94 virtual int SetOption(rtc::Socket::Option opt, int value) = 0; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 bool writable_; | 174 bool writable_; |
174 bool receiving_; | 175 bool receiving_; |
175 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; | 176 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; |
176 | 177 |
177 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); | 178 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); |
178 }; | 179 }; |
179 | 180 |
180 } // namespace cricket | 181 } // namespace cricket |
181 | 182 |
182 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ | 183 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ |
OLD | NEW |