Index: webrtc/p2p/base/candidate.h |
diff --git a/webrtc/p2p/base/candidate.h b/webrtc/p2p/base/candidate.h |
index c2b889541e72165461c9a2f4055dd14d9b73651b..7e05f602ae07cfdd2d228ff135f8bfe7134956a7 100644 |
--- a/webrtc/p2p/base/candidate.h |
+++ b/webrtc/p2p/base/candidate.h |
@@ -70,6 +70,18 @@ class Candidate { |
const std::string & protocol() const { return protocol_; } |
void set_protocol(const std::string & protocol) { protocol_ = protocol; } |
+ // The protocol used by the first hop. Mainly interesting for TURN/TCP |
+ // candidate as it's actually TCP although the candidate is udp itself. |
+ const std::string& first_hop_protocol() const { |
juberti1
2015/08/14 21:04:59
Rather than duplicating the protocol value in case
|
+ if (first_hop_protocol_.empty()) { |
+ return protocol_; |
+ } |
+ return first_hop_protocol_; |
+ } |
+ void set_first_hop_protocol(const std::string& protocol) { |
+ first_hop_protocol_ = protocol; |
+ } |
+ |
const rtc::SocketAddress & address() const { return address_; } |
void set_address(const rtc::SocketAddress & address) { |
address_ = address; |
@@ -214,6 +226,7 @@ class Candidate { |
std::string id_; |
int component_; |
std::string protocol_; |
+ std::string first_hop_protocol_; |
rtc::SocketAddress address_; |
uint32 priority_; |
std::string username_; |