Date: Wed, 11 Jun 2025 11:44:30 -0600 (MDT) From: Paul Vixie <paul@redbarn.org> To: freebsd-net@freebsd.org Subject: poll / select Message-ID: <0036fcd2-9e13-4717-bf78-97f075a343cf@redbarn.org> In-Reply-To: <1106147709.26643.1749641962654@nm22.abv.bg> References: <1106147709.26643.1749641962654@nm22.abv.bg>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] If you have to answer UDP requests and may need to do separate upstream work to construct that answer, use a nonblocking socket and epoll(), or fork a thread and use a normal blocking socket. This is how DNS servers operate. If you only listen, no answers or other work to do per request other than perhaps logging the inbound messages to the file system, a normal blocking socket is all you need. Paul Vixie [-- Attachment #2 --] <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <span dir="ltr" style="margin-top:0; margin-bottom:0;">If you have to answer UDP requests and may need to do separate upstream work to construct that answer, use a nonblocking socket and epoll(), or fork a thread and use a normal blocking socket. This is how DNS servers operate.</span> <br> <br><span dir="ltr" style="margin-top:0; margin-bottom:0;">If you only listen, no answers or other work to do per request other than perhaps logging the inbound messages to the file system, a normal blocking socket is all you need.</span> <br> <div class="fairemail_signature"> <span dir="ltr" style="margin-top:0; margin-bottom:0;">Paul Vixie</span> <br> </div> </body> </html>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0036fcd2-9e13-4717-bf78-97f075a343cf>
