Lines Matching +full:continue +full:- +full:on +full:- +full:error
2 * libwebsockets - small server side websockets and web server implementation
4 * Copyright (C) 2010 - 2021 Andy Green <andy@warmcat.com>
29 #include "private-lib-core.h"
48 /* the fact we checked implies we avoided back-to-back writes */ in lws_send_pipe_choked()
49 wsi_eff->could_have_pending = 0; in lws_send_pipe_choked()
54 ||wsi->http.comp_ctx.buflist_comp || in lws_send_pipe_choked()
55 wsi->http.comp_ctx.may_have_more in lws_send_pipe_choked()
60 return (int)wsi_eff->sock_send_blocking; in lws_send_pipe_choked()
69 assert((fd->events & LWS_POLLIN) == LWS_POLLIN); in lws_poll_listen_fd()
72 FD_SET(fd->fd, &readfds); in lws_poll_listen_fd()
74 return select(((int)fd->fd) + 1, &readfds, NULL, NULL, &tv); in lws_poll_listen_fd()
85 int error = LWS_ERRNO; in lws_plat_set_nonblocking() local
86 lwsl_err("ioctlsocket FIONBIO 1 failed with error %d\n", error); in lws_plat_set_nonblocking()
105 if (vhost->ka_time) { in lws_plat_set_socket_options()
106 /* enable keepalive on this socket */ in lws_plat_set_socket_options()
111 int error = LWS_ERRNO; in lws_plat_set_socket_options() local
112 lwsl_err("setsockopt SO_KEEPALIVE 1 failed with error %d\n", error); in lws_plat_set_socket_options()
118 alive.keepalivetime = vhost->ka_time * 1000; in lws_plat_set_socket_options()
119 alive.keepaliveinterval = vhost->ka_interval * 1000; in lws_plat_set_socket_options()
124 int error = LWS_ERRNO; in lws_plat_set_socket_options() local
125 …tl SIO_KEEPALIVE_VALS 1 %lu %lu failed with error %d\n", alive.keepalivetime, alive.keepaliveinter… in lws_plat_set_socket_options()
137 int error = LWS_ERRNO; in lws_plat_set_socket_options() local
138 lwsl_warn("getprotobyname(\"TCP\") failed with error, falling back to 6 %d\n", error); in lws_plat_set_socket_options()
142 protonbr = tcp_proto->p_proto; in lws_plat_set_socket_options()
149 int error = LWS_ERRNO; in lws_plat_set_socket_options() local
150 lwsl_warn("setsockopt TCP_NODELAY 1 failed with error %d\n", error); in lws_plat_set_socket_options()
163 * https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options in lws_plat_set_socket_options_ip()
164 * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/qos/differentiated-services in lws_plat_set_socket_options_ip()
166 lwsl_warn("%s: not implemented on windows platform\n", __func__); in lws_plat_set_socket_options_ip()
180 if (lws_plat_inet_pton(AF_INET6, ifname, &addr6->sin6_addr) == 1) { in lws_interface_to_sa()
191 address = ((struct in_addr *)entry->h_addr_list[0])->s_addr; in lws_interface_to_sa()
197 addr->sin_addr.s_addr = (unsigned long)(lws_intptr_t)address; in lws_interface_to_sa()
205 struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi]; in lws_plat_insert_socket_into_fds()
208 if (wsi->udp) { in lws_plat_insert_socket_into_fds()
210 pt->fds[pt->fds_count].events |= LWS_POLLIN; in lws_plat_insert_socket_into_fds()
214 if (context->event_loop_ops->io) in lws_plat_insert_socket_into_fds()
215 context->event_loop_ops->io(wsi, LWS_EV_START | LWS_EV_READ); in lws_plat_insert_socket_into_fds()
217 pt->fds[pt->fds_count++].revents = 0; in lws_plat_insert_socket_into_fds()
219 lws_plat_change_pollfd(context, wsi, &pt->fds[pt->fds_count - 1]); in lws_plat_insert_socket_into_fds()
226 struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi]; in lws_plat_delete_socket_from_fds()
228 pt->fds_count--; in lws_plat_delete_socket_from_fds()
238 if (getsockopt(wsi->desc.sockfd, SOL_SOCKET, SO_ERROR, in lws_plat_check_connection_error()
253 //struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi]; in lws_plat_change_pollfd()
271 if (lws_check_opt(vhost->options, in lws_plat_vhost_tls_client_ctx_init()
280 store = SSL_CTX_get_cert_store(vhost->tls.ssl_client_ctx); in lws_plat_vhost_tls_client_ctx_init()
306 ecert = (const unsigned char*)pcc->pbCertEncoded; in lws_plat_vhost_tls_client_ctx_init()
308 continue; in lws_plat_vhost_tls_client_ctx_init()
311 if (CompareFileTime(&pcc->pCertInfo->NotBefore, &ft) > 0 || in lws_plat_vhost_tls_client_ctx_init()
312 CompareFileTime(&ft, &pcc->pCertInfo->NotAfter) > 0) in lws_plat_vhost_tls_client_ctx_init()
313 continue; in lws_plat_vhost_tls_client_ctx_init()
316 if (CertGetIntendedKeyUsage(pcc->dwCertEncodingType, in lws_plat_vhost_tls_client_ctx_init()
317 pcc->pCertInfo, in lws_plat_vhost_tls_client_ctx_init()
320 continue; in lws_plat_vhost_tls_client_ctx_init()
323 continue; in lws_plat_vhost_tls_client_ctx_init()
331 * The call below checks both, and behavior varies depending on in lws_plat_vhost_tls_client_ctx_init()
336 continue; in lws_plat_vhost_tls_client_ctx_init()
351 continue; in lws_plat_vhost_tls_client_ctx_init()
353 if (!ceu || (ceu && !ceu->cUsageIdentifier)) { in lws_plat_vhost_tls_client_ctx_init()
360 continue; in lws_plat_vhost_tls_client_ctx_init()
374 for (i = 0; i < ceu->cUsageIdentifier; i++) { in lws_plat_vhost_tls_client_ctx_init()
377 ceu->rgpszUsageIdentifier[i])) in lws_plat_vhost_tls_client_ctx_init()
378 continue; in lws_plat_vhost_tls_client_ctx_init()
386 continue; in lws_plat_vhost_tls_client_ctx_init()
389 x509 = d2i_X509(NULL, &ecert, pcc->cbCertEncoded); in lws_plat_vhost_tls_client_ctx_init()
392 continue; in lws_plat_vhost_tls_client_ctx_init()
480 return -1; in lws_plat_inet_pton()
487 return -1; in lws_plat_inet_pton()
523 return ok ? 1 : -1; in lws_plat_inet_pton()
529 lwsl_err("%s: UNIMPLEMENTED on this platform\n", __func__); in lws_plat_ifname_to_hwaddr()
531 return -1; in lws_plat_ifname_to_hwaddr()
538 lwsl_err("%s: UNIMPLEMENTED on this platform\n", __func__); in lws_plat_rawudp_broadcast()
540 return -1; in lws_plat_rawudp_broadcast()
546 lwsl_err("%s: UNIMPLEMENTED on this platform\n", __func__); in lws_plat_if_up()
548 return -1; in lws_plat_if_up()
554 lwsl_err("%s: UNIMPLEMENTED on this platform\n", __func__); in lws_plat_BINDTODEVICE()
556 return -1; in lws_plat_BINDTODEVICE()
562 lwsl_err("%s: UNIMPLEMENTED on this platform\n", __func__); in lws_plat_ifconfig()
564 return -1; in lws_plat_ifconfig()
571 int fd = ((mbedtls_net_context *) ctx)->fd; in lws_plat_mbedtls_net_send()
596 int fd = ((mbedtls_net_context *) ctx)->fd; in lws_plat_mbedtls_net_recv()