mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-11 06:36:11 +03:00
socket: Add RawConnect method
This commit is contained in:
parent
c0c332c297
commit
29f29af1b8
@ -279,6 +279,29 @@ int InitSocketHandleForWebSocketRequest(
|
|||||||
std::move(callback), proxy_auth_callback);
|
std::move(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,
|
||||||
|
NetworkIsolationKey network_isolation_key,
|
||||||
|
const NetLogWithSource& net_log,
|
||||||
|
ClientSocketHandle* socket_handle,
|
||||||
|
CompletionOnceCallback callback) {
|
||||||
|
DCHECK(socket_handle);
|
||||||
|
return InitSocketPoolHelper(
|
||||||
|
{"http", endpoint.HostForURL(), endpoint.port()}, request_load_flags,
|
||||||
|
request_priority, session, proxy_info, ssl_config_for_origin,
|
||||||
|
ssl_config_for_proxy,
|
||||||
|
/*is_for_websockets=*/true, privacy_mode,
|
||||||
|
std::move(network_isolation_key), SecureDnsPolicy::kDisable, SocketTag(),
|
||||||
|
net_log, 0, socket_handle, HttpNetworkSession::NORMAL_SOCKET_POOL,
|
||||||
|
std::move(callback), ClientSocketPool::ProxyAuthCallback());
|
||||||
|
}
|
||||||
|
|
||||||
int PreconnectSocketsForHttpRequest(url::SchemeHostPort endpoint,
|
int PreconnectSocketsForHttpRequest(url::SchemeHostPort endpoint,
|
||||||
int request_load_flags,
|
int request_load_flags,
|
||||||
RequestPriority request_priority,
|
RequestPriority request_priority,
|
||||||
|
@ -127,6 +127,20 @@ 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,
|
||||||
|
NetworkIsolationKey network_isolation_key,
|
||||||
|
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(url::SchemeHostPort endpoint,
|
int PreconnectSocketsForHttpRequest(url::SchemeHostPort endpoint,
|
||||||
|
Loading…
Reference in New Issue
Block a user