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: |