>The difference in UDP is that not having a connection makes it harder to model
>with the stdin/stdout method of UCSPI, right?
Yes. A super-server model makes sense for TCP because you can spawn
one server to handle one stream; not so much for UDP, because there is
no stream, only packets, and you don't want to spawn a process for
every packet.
A UDP server doesn't have to deal with the complexity of multiplexing
exchanges with different clients, either, since it only needs to
respond to every packet in sequence. No parallelism needed, it's all
very straightforward and simple to write.
djbdns does the exact same: axfrdns is spawned by a super-server, but
tinydns binds to its UDP socket itself.
--
Laurent
Received on Thu Dec 21 2023 - 13:13:13 CET