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

Unified Diff: webrtc/p2p/base/turnport.cc

Issue 2993403002: Support a user-provided string for the TLS ALPN extension.
Patch Set: Fix previous commit Created 3 years, 4 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/turnport.h ('k') | webrtc/p2p/base/turnport_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnport.cc
diff --git a/webrtc/p2p/base/turnport.cc b/webrtc/p2p/base/turnport.cc
index 4dfe06d13a50cc889a13148c866d6fccfe247521..7b7874540eadfd6fa13b115f68c62c3c287ea3d2 100644
--- a/webrtc/p2p/base/turnport.cc
+++ b/webrtc/p2p/base/turnport.cc
@@ -221,7 +221,8 @@ TurnPort::TurnPort(rtc::Thread* thread,
const ProtocolAddress& server_address,
const RelayCredentials& credentials,
int server_priority,
- const std::string& origin)
+ const std::string& origin,
+ const std::vector<std::string>& tls_alpn_protocols)
: Port(thread,
RELAY_PORT_TYPE,
factory,
@@ -231,6 +232,7 @@ TurnPort::TurnPort(rtc::Thread* thread,
username,
password),
server_address_(server_address),
+ tls_alpn_protocols_(tls_alpn_protocols),
credentials_(credentials),
socket_(NULL),
resolver_(NULL),
@@ -336,9 +338,16 @@ bool TurnPort::CreateTurnClientSocket() {
}
}
+ rtc::PacketSocketTcpOptions tcp_options;
+ tcp_options.opts = opts;
+ tcp_options.tls_alpn_protocols = tls_alpn_protocols_;
+// rtc::PacketSocketTcpOptions tcp_options = {
+// .opts = opts,
+// .tls_alpn_protocols = tls_alpn_protocols_
+// };
socket_ = socket_factory()->CreateClientTcpSocket(
rtc::SocketAddress(Network()->GetBestIP(), 0), server_address_.address,
- proxy(), user_agent(), opts);
+ proxy(), user_agent(), tcp_options);
}
if (!socket_) {
« no previous file with comments | « webrtc/p2p/base/turnport.h ('k') | webrtc/p2p/base/turnport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698