From 772873104658182a5b76f5c0eed76047c62c6651 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Wed, 28 Oct 2026 23:31:07 +0100 Subject: With more workers blockingly waiting on udp sockets, we need to keep track of all sockets to shut them down on exit --- ot_socket.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ot_socket.h') diff --git a/ot_socket.h b/ot_socket.h index f73a5c9..9340d0d 100644 --- a/ot_socket.h +++ b/ot_socket.h @@ -39,6 +39,10 @@ int socket_is_connected(int s); int socket_accept(int s, ot_ip6 ip, uint16_t *port); int socket_set_blocking(int s, int blocking); +/* Bound how long a blocking read waits, so the thread sitting in one gets to + look at the running flag now and then */ +int socket_set_timeout(int s, int seconds); + ssize_t socket_recv(int s, void *buf, size_t len, ot_ip6 ip, uint16_t *port); ssize_t socket_send(int s, const void *buf, size_t len, const ot_ip6 ip, uint16_t port); -- cgit v1.3