MCPcopy Create free account
hub / github.com/apache/httpd / ap_sock_disable_nagle

Function ap_sock_disable_nagle

server/mpm_common.c:210–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209#if defined(TCP_NODELAY)
210void ap_sock_disable_nagle(apr_socket_t *s)
211{
212 /* The Nagle algorithm says that we should delay sending partial
213 * packets in hopes of getting more data. We don't want to do
214 * this; we are not telnet. There are bad interactions between
215 * persistent connections and Nagle's algorithm that have very severe
216 * performance penalties. (Failing to disable Nagle is not much of a
217 * problem with simple HTTP.)
218 *
219 * In spite of these problems, failure here is not a shooting offense.
220 */
221 apr_status_t status = apr_socket_opt_set(s, APR_TCP_NODELAY, 1);
222
223 if (status != APR_SUCCESS) {
224 ap_log_error(APLOG_MARK, APLOG_WARNING, status, ap_server_conf, APLOGNO(00542)
225 "apr_socket_opt_set: (TCP_NODELAY)");
226 }
227}
228#endif
229
230#ifdef HAVE_GETPWNAM

Callers 2

session_startFunction · 0.85
make_sockFunction · 0.85

Calls 1

ap_log_errorFunction · 0.50

Tested by

no test coverage detected