Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(582)

Unified Diff: webrtc/p2p/base/transportchannel.h

Issue 1414363002: Exposing DTLS transport state from TransportChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing Windows compiler warning. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/transport.h ('k') | webrtc/p2p/base/transportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportchannel.h
diff --git a/webrtc/p2p/base/transportchannel.h b/webrtc/p2p/base/transportchannel.h
index 9dc9c3a4956285feb038c661a0046adcf13e69a9..767a5f68bf2acd65e2ab7f3433b7a179e0af9536 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,13 @@ 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_state() const { return dtls_state_; }
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*> SignalDtlsState;
// 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 +163,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_state(DtlsTransportState state);
+
private:
// Used mostly for debugging.
std::string transport_name_;
int component_;
bool writable_;
bool receiving_;
+ DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW;
RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel);
};
« no previous file with comments | « webrtc/p2p/base/transport.h ('k') | webrtc/p2p/base/transportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698