Lines Matching refs:fds

39 static struct zsock_pollfd fds[SOCK_ID_MAX];  variable
110 for (i = 0; i < ARRAY_SIZE(fds); i++) { in tcp_receiver_cleanup()
111 if (fds[i].fd >= 0) { in tcp_receiver_cleanup()
112 zsock_close(fds[i].fd); in tcp_receiver_cleanup()
113 fds[i].fd = -1; in tcp_receiver_cleanup()
157 if (fds[SOCK_ID_IPV4_LISTEN].fd == pev->event.fd || in tcp_recv_data()
158 fds[SOCK_ID_IPV6_LISTEN].fd == pev->event.fd) { in tcp_recv_data()
172 if (fds[i].fd < 0) { in tcp_recv_data()
182 fds[i].fd = sock; in tcp_recv_data()
183 fds[i].events = ZSOCK_POLLIN; in tcp_recv_data()
186 (void)net_socket_service_register(&svc_tcp, fds, in tcp_recv_data()
187 ARRAY_SIZE(fds), in tcp_recv_data()
205 if (fds[i].fd == pev->event.fd) { in tcp_recv_data()
215 zsock_close(fds[i].fd); in tcp_recv_data()
216 fds[i].fd = -1; in tcp_recv_data()
219 (void)net_socket_service_register(&svc_tcp, fds, in tcp_recv_data()
220 ARRAY_SIZE(fds), in tcp_recv_data()
281 for (int i = 0; i < ARRAY_SIZE(fds); i++) { in zperf_tcp_receiver_init()
282 fds[i].fd = -1; in zperf_tcp_receiver_init()
291 fds[SOCK_ID_IPV4_LISTEN].fd = zsock_socket(AF_INET, SOCK_STREAM, in zperf_tcp_receiver_init()
293 if (fds[SOCK_ID_IPV4_LISTEN].fd < 0) { in zperf_tcp_receiver_init()
326 &fds[SOCK_ID_IPV4_LISTEN], in zperf_tcp_receiver_init()
337 fds[SOCK_ID_IPV6_LISTEN].fd = zsock_socket(AF_INET6, SOCK_STREAM, in zperf_tcp_receiver_init()
339 if (fds[SOCK_ID_IPV6_LISTEN].fd < 0) { in zperf_tcp_receiver_init()
374 &fds[SOCK_ID_IPV6_LISTEN], in zperf_tcp_receiver_init()
383 ret = net_socket_service_register(&svc_tcp, fds, in zperf_tcp_receiver_init()
384 ARRAY_SIZE(fds), NULL); in zperf_tcp_receiver_init()