socket: Add RawConnect method

This commit is contained in:
klzgrad 2018-12-08 00:52:08 -05:00
parent 5b3b13f23c
commit fee86494f0
2 changed files with 34 additions and 0 deletions

View File

@ -283,6 +283,27 @@ int InitSocketHandleForWebSocketRequest(
proxy_auth_callback); proxy_auth_callback);
} }
int InitSocketHandleForRawConnect2(const HostPortPair& endpoint,
HttpNetworkSession* session,
int request_load_flags,
RequestPriority request_priority,
const ProxyInfo& proxy_info,
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
CompletionOnceCallback callback) {
DCHECK(socket_handle);
return InitSocketPoolHelper(
ClientSocketPoolManager::NORMAL_GROUP, endpoint, request_load_flags,
request_priority, session, proxy_info, ssl_config_for_origin,
ssl_config_for_proxy, true /* is_for_websockets */, privacy_mode,
NetworkIsolationKey(), SocketTag(), net_log, 0, socket_handle,
HttpNetworkSession::NORMAL_SOCKET_POOL, std::move(callback),
ClientSocketPool::ProxyAuthCallback());
}
int PreconnectSocketsForHttpRequest( int PreconnectSocketsForHttpRequest(
ClientSocketPoolManager::SocketGroupType group_type, ClientSocketPoolManager::SocketGroupType group_type,
const HostPortPair& endpoint, const HostPortPair& endpoint,

View File

@ -138,6 +138,19 @@ int InitSocketHandleForWebSocketRequest(
CompletionOnceCallback callback, CompletionOnceCallback callback,
const ClientSocketPool::ProxyAuthCallback& proxy_auth_callback); const ClientSocketPool::ProxyAuthCallback& proxy_auth_callback);
NET_EXPORT int InitSocketHandleForRawConnect2(
const HostPortPair& endpoint,
HttpNetworkSession* session,
int request_load_flags,
RequestPriority request_priority,
const ProxyInfo& proxy_info,
const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode,
const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle,
CompletionOnceCallback callback);
// Similar to InitSocketHandleForHttpRequest except that it initiates the // Similar to InitSocketHandleForHttpRequest except that it initiates the
// desired number of preconnect streams from the relevant socket pool. // desired number of preconnect streams from the relevant socket pool.
int PreconnectSocketsForHttpRequest( int PreconnectSocketsForHttpRequest(