Index: webrtc/p2p/base/transportchannel.h |
diff --git a/webrtc/p2p/base/transportchannel.h b/webrtc/p2p/base/transportchannel.h |
index 9dc9c3a4956285feb038c661a0046adcf13e69a9..e7d05c8a27b4e3ccc2c7f5e86f59b8065848b4a6 100644 |
--- a/webrtc/p2p/base/transportchannel.h |
+++ b/webrtc/p2p/base/transportchannel.h |
@@ -46,6 +46,8 @@ enum TransportChannelState { |
// A TransportChannel represents one logical stream of packets that are sent |
// between the two sides of a session. |
+// TODO(deadbeef): This interface currently represents the unity of an ICE |
+// transport and a DTLS transport. They need to be separated apart. |
class TransportChannel : public sigslot::has_slots<> { |
public: |
TransportChannel(const std::string& transport_name, int component) |
@@ -72,10 +74,15 @@ class TransportChannel : public sigslot::has_slots<> { |
// a signal is raised. These states are aggregated by the TransportManager. |
bool writable() const { return writable_; } |
bool receiving() const { return receiving_; } |
+ DtlsTransportState dtls_transport_state() const { |
+ return dtls_transport_state_; |
+ } |
pthatcher1
2015/10/20 20:28:07
I agree with the type name (DtlsTransportState), b
Taylor Brandstetter
2015/10/21 16:28:16
That's what I had originally, then I renamed it ha
|
sigslot::signal1<TransportChannel*> SignalWritableState; |
// Emitted when the TransportChannel's ability to send has changed. |
sigslot::signal1<TransportChannel*> SignalReadyToSend; |
sigslot::signal1<TransportChannel*> SignalReceivingState; |
+ // Emitted when the DtlsTransportState has changed. |
+ sigslot::signal1<TransportChannel*> SignalDtlsTransportState; |
pthatcher1
2015/10/20 20:28:07
And this SignalDtlsState.
Taylor Brandstetter
2015/10/21 16:28:16
Done.
|
// Attempts to send the given packet. The return value is < 0 on failure. |
// TODO: Remove the default argument once channel code is updated. |
@@ -158,12 +165,16 @@ class TransportChannel : public sigslot::has_slots<> { |
// Sets the receiving state, signaling if necessary. |
void set_receiving(bool receiving); |
+ // Sets the DTLS state, signaling if necessary. |
+ void set_dtls_transport_state(DtlsTransportState state); |
pthatcher1
2015/10/20 20:28:06
And this set_dtls_state.
Taylor Brandstetter
2015/10/21 16:28:16
Done.
|
+ |
private: |
// Used mostly for debugging. |
std::string transport_name_; |
int component_; |
bool writable_; |
bool receiving_; |
+ DtlsTransportState dtls_transport_state_ = DTLS_TRANSPORT_NEW; |
pthatcher1
2015/10/20 20:28:07
And this dtls_state_ :).
Taylor Brandstetter
2015/10/21 16:28:16
Done.
|
RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); |
}; |