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);
146 if (on != apr_is_option_set(sock, APR_SO_BROADCAST)) {
150 apr_set_option(sock, APR_SO_BROADCAST, on);
157 if (on != apr_is_option_set(sock, APR_SO_REUSEADDR)) {
161 apr_set_option(sock, APR_SO_REUSEADDR, on);
166 if (setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDBUF, (void *)&on, sizeof(int)) == -1) {
175 if (setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVBUF, (void *)&on, sizeof(int)) == -1) {
183 if (apr_is_option_set(sock, APR_SO_NONBLOCK) != on) {
184 if (on) {
192 apr_set_option(sock, APR_SO_NONBLOCK, on);
197 if (apr_is_option_set(sock, APR_SO_LINGER) != on) {
199 li.l_onoff = on;
204 apr_set_option(sock, APR_SO_LINGER, on);
212 if (apr_is_option_set(sock, APR_TCP_DEFER_ACCEPT) != on) {
217 (void *)&on, sizeof(int)) == -1) {
220 apr_set_option(sock, APR_TCP_DEFER_ACCEPT, on);
228 if (apr_is_option_set(sock, APR_TCP_NODELAY) != on) {
238 if (setsockopt(sock->socketdes, optlevel, optname, (void *)&on, sizeof(int)) == -1) {
241 apr_set_option(sock, APR_TCP_NODELAY, on);
246 * for it to be turned on!
249 if (on == 1)
258 /* TCP_NODELAY and TCP_CORK are mutually exclusive on Linux
259 * kernels < 2.6; on newer kernels they can be used together
263 if (apr_is_option_set(sock, APR_TCP_NOPUSH) != on) {
275 if (apr_is_option_set(sock, APR_TCP_NODELAY) == 1 && on) {
277 * turned on: */
285 } else if (on) {
292 (void*)&on, sizeof(int)) == -1) {
295 apr_set_option(sock, APR_TCP_NOPUSH, on);
297 if (!on && apr_is_option_set(sock, APR_RESET_NODELAY)) {
299 * TCP_NODELAY back on again if it was earlier toggled
316 apr_set_option(sock, APR_INCOMPLETE_READ, on);
325 (void *)&on, sizeof(int)) == -1) {
328 apr_set_option(sock, APR_IPV6_V6ONLY, on);
339 apr_set_option(sock, APR_SO_FREEBIND, on);
363 apr_int32_t opt, apr_int32_t *on)
367 *on = apr_is_option_set(sock, opt);