Lines Matching refs:fds
36 LOG_DBG("Closing connection to #%d", ws->fds[0].fd); in ws_end_client_connection()
38 (void)log_backend_ws_unregister(ws->fds[0].fd); in ws_end_client_connection()
40 (void)websocket_unregister(ws->fds[0].fd); in ws_end_client_connection()
42 ws->fds[0].fd = -1; in ws_end_client_connection()
47 ret = net_socket_service_register(&websocket_server, ws->fds, in ws_end_client_connection()
48 ARRAY_SIZE(ws->fds), NULL); in ws_end_client_connection()
64 if (ws->fds[0].fd < 0) { in ws_send()
69 ret = zsock_send(ws->fds[0].fd, msg, len, in ws_send()
174 if (evt->event.fd == ws->fds[0].fd) { in ws_server_cb()
185 if (evt->event.fd == ws->fds[0].fd) { in ws_server_cb()
186 return ws_recv(ws, &ws->fds[0]); in ws_server_cb()
199 if (ctx->fds[0].fd >= 0) { in shell_ws_init()
206 ctx->fds[0].fd = ws_socket; in shell_ws_init()
207 ctx->fds[0].events = ZSOCK_POLLIN; in shell_ws_init()
209 ret = net_socket_service_register(&websocket_server, ctx->fds, in shell_ws_init()
210 ARRAY_SIZE(ctx->fds), ctx); in shell_ws_init()
221 if (ctx->fds[0].fd >= 0) { in shell_ws_init()
222 (void)zsock_close(ctx->fds[0].fd); in shell_ws_init()
223 ctx->fds[0].fd = -1; in shell_ws_init()
241 for (int i = 0; i < ARRAY_SIZE(ws->fds); i++) { in init()
242 ws->fds[i].fd = -1; in init()
281 if (ws->fds[0].fd < 0 || ws->output_lock) { in sh_write()
339 if (ws->fds[0].fd < 0) { in sh_read()