Set up all the accepts and sockets. */
| 261 | /** Set up all the accepts and sockets. |
| 262 | */ |
| 263 | void |
| 264 | init_accept_HttpProxyServer(int n_accept_threads) |
| 265 | { |
| 266 | HttpProxyPort::Group &proxy_ports = HttpProxyPort::global(); |
| 267 | |
| 268 | init_reverse_proxy(); |
| 269 | |
| 270 | #ifdef USE_HTTP_DEBUG_LISTS |
| 271 | ink_mutex_init(&debug_sm_list_mutex); |
| 272 | ink_mutex_init(&debug_cs_list_mutex); |
| 273 | #endif |
| 274 | |
| 275 | // Used to give plugins the ability to create http requests |
| 276 | // The equivalent of the connecting to localhost on the proxy |
| 277 | // port but without going through the operating system |
| 278 | // |
| 279 | if (plugin_http_accept == nullptr) { |
| 280 | plugin_http_accept = new HttpSessionAccept(); |
| 281 | } |
| 282 | |
| 283 | // Same as plugin_http_accept except outbound transparent. |
| 284 | if (!plugin_http_transparent_accept) { |
| 285 | HttpSessionAccept::Options ha_opt; |
| 286 | ha_opt.setOutboundTransparent(true); |
| 287 | plugin_http_transparent_accept = new HttpSessionAccept(ha_opt); |
| 288 | } |
| 289 | |
| 290 | if (!ssl_plugin_mutex) { |
| 291 | ssl_plugin_mutex = new_ProxyMutex(); |
| 292 | } |
| 293 | |
| 294 | // Do the configuration defined ports. |
| 295 | // Assign temporary empty objects of proxy ports size |
| 296 | HttpProxyAcceptors.assign(proxy_ports.size(), HttpProxyAcceptor()); |
| 297 | for (int i = 0, n = proxy_ports.size(); i < n; ++i) { |
| 298 | MakeHttpProxyAcceptor(HttpProxyAcceptors.at(i), proxy_ports[i], n_accept_threads); |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | /** Increment the counter to keep track of how many et_net threads |
| 303 | * we have started. This function is scheduled at the start of each |
no test coverage detected