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

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

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/basicpacketsocketfactory.cc ('k') | webrtc/p2p/base/port_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/packetsocketfactory.h
diff --git a/webrtc/p2p/base/packetsocketfactory.h b/webrtc/p2p/base/packetsocketfactory.h
index 60f0ae058055c04ec06c833bcc789252f55c9143..e66a4afc0962f726085d4944610491f06bebbb0f 100644
--- a/webrtc/p2p/base/packetsocketfactory.h
+++ b/webrtc/p2p/base/packetsocketfactory.h
@@ -16,6 +16,12 @@
namespace rtc {
+// This structure contains options required to create TCP packet sockets.
+struct PacketSocketTcpOptions {
+ int opts;
+ std::vector<std::string> tls_alpn_protocols;
+};
+
class AsyncPacketSocket;
class AsyncResolverInterface;
@@ -45,7 +51,7 @@ class PacketSocketFactory {
uint16_t max_port,
int opts) = 0;
- // TODO: |proxy_info| and |user_agent| should be set
+ // TODO(deadbeef): |proxy_info| and |user_agent| should be set
// per-factory and not when socket is created.
virtual AsyncPacketSocket* CreateClientTcpSocket(
const SocketAddress& local_address,
@@ -54,6 +60,21 @@ class PacketSocketFactory {
const std::string& user_agent,
int opts) = 0;
+ // TODO(deadbeef): |proxy_info|, |user_agent| and |tcp_options| should
+ // be set per-factory and not when socket is created.
+ // TODO(deadbeef): Implement this method in all subclasses (namely those in
+ // Chromium), make pure virtual, and remove the old CreateClientTcpSocket.
+ virtual AsyncPacketSocket* CreateClientTcpSocket(
+ const SocketAddress& local_address,
+ const SocketAddress& remote_address,
+ const ProxyInfo& proxy_info,
+ const std::string& user_agent,
+ const PacketSocketTcpOptions& tcp_options) {
+ return CreateClientTcpSocket(local_address, remote_address, proxy_info,
+ user_agent, tcp_options.opts);
+ }
+
+
virtual AsyncResolverInterface* CreateAsyncResolver() = 0;
private:
« no previous file with comments | « webrtc/p2p/base/basicpacketsocketfactory.cc ('k') | webrtc/p2p/base/port_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698