• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/apache-786.1/httpd/srclib/apr/network_io/unix/

Lines Matching defs:on

11  * distributed under the License is distributed on an "AS IS" BASIS,
35 #error Please teach APR how to make sockets blocking on your platform.
41 int on = 0;
42 if (setsockopt(sd, SOL_SOCKET, SO_NONBLOCK, &on, sizeof(int)) < 0)
61 #error Please teach APR how to make sockets non-blocking on your platform.
67 int on = 1;
68 if (setsockopt(sd, SOL_SOCKET, SO_NONBLOCK, &on, sizeof(int)) < 0)
83 * We want to avoid calling fcntl more than necessary on the
114 apr_int32_t opt, apr_int32_t on)
119 if (on)
126 if (on != apr_is_option_set(sock, APR_SO_KEEPALIVE)) {
130 apr_set_option(sock, APR_SO_KEEPALIVE, on);
137 if (on != apr_is_option_set(sock, APR_SO_DEBUG)) {
141 apr_set_option(sock, APR_SO_DEBUG, on);
145 if (on != apr_is_option_set(sock, APR_SO_REUSEADDR)) {
149 apr_set_option(sock, APR_SO_REUSEADDR, on);
154 if (setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDBUF, (void *)&on, sizeof(int)) == -1) {
163 if (setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVBUF, (void *)&on, sizeof(int)) == -1) {
171 if (apr_is_option_set(sock, APR_SO_NONBLOCK) != on) {
172 if (on) {
180 apr_set_option(sock, APR_SO_NONBLOCK, on);
185 if (apr_is_option_set(sock, APR_SO_LINGER) != on) {
187 li.l_onoff = on;
192 apr_set_option(sock, APR_SO_LINGER, on);
200 if (apr_is_option_set(sock, APR_TCP_DEFER_ACCEPT) != on) {
205 (void *)&on, sizeof(int)) == -1) {
208 apr_set_option(sock, APR_TCP_DEFER_ACCEPT, on);
216 if (apr_is_option_set(sock, APR_TCP_NODELAY) != on) {
226 if (setsockopt(sock->socketdes, optlevel, optname, (void *)&on, sizeof(int)) == -1) {
229 apr_set_option(sock, APR_TCP_NODELAY, on);
234 * for it to be turned on!
237 if (on == 1)
246 /* TCP_NODELAY and TCP_CORK are mutually exclusive on Linux
247 * kernels < 2.6; on newer kernels they can be used together
251 if (apr_is_option_set(sock, APR_TCP_NOPUSH) != on) {
263 if (apr_is_option_set(sock, APR_TCP_NODELAY) == 1 && on) {
265 * turned on: */
273 } else if (on) {
280 (void*)&on, sizeof(int)) == -1) {
283 apr_set_option(sock, APR_TCP_NOPUSH, on);
285 if (!on && apr_is_option_set(sock, APR_RESET_NODELAY)) {
287 * TCP_NODELAY back on again if it was earlier toggled
304 apr_set_option(sock, APR_INCOMPLETE_READ, on);
313 (void *)&on, sizeof(int)) == -1) {
316 apr_set_option(sock, APR_IPV6_V6ONLY, on);
337 apr_int32_t opt, apr_int32_t *on)
341 *on = apr_is_option_set(sock, opt);