poll / select

Paul Vixie <[email protected]>
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.