Re: s6, listen(8), etc.

From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups_at_NTLWorld.com>
Date: Mon, 5 Sep 2016 08:06:42 +0100

Laurent Bercot:

> how does the daemon know what fd corresponds to what use?
>
In the wild, it's generally a for() loop over the passed-in descriptors
that checks each socket type. In the wild, only one of any type is
often the case.

"If AF_INET4 and SOCK_DGRAM, this must be my UDP4 socket."

That's how I patched dnscache and tinydns to work, too. A simple set of
socket_is() functions in the Bernstein socket library, and it is off and
away.
Received on Mon Sep 05 2016 - 07:06:42 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC