[Swan-dev] Question on writefds fd

Paul Wouters paul at nohats.ca
Thu Jan 15 20:22:43 EET 2015


On Thu, 15 Jan 2015, D. Hugh Redelmeier wrote:

> | From: Paul Wouters <paul at nohats.ca>
>
> | So only the adns code is using the writefds fd in pluto. Since that code
> | is now being removed and replaced with a libevent variant, there is
> | nothing left in the writefds. Is there any reason to not completely
> | remove it? (I'm a little confused why we had a readfds and writefds)
>
> My understanding is that the ADNS code is being replaced by an unbound
> variant, not a libevent variant.  Unless I misunderstand.

unbound events hooks into libevent.

> If nobody is using writefds, surely it can be removed.  I haven't
> looked at this code in a long time (because it worked).

We justed wanted to make sure there was no design principle behind
writefds (versus readfds) that we were missing.

> I would have thought that we are either 100% libevent or 100% select.
> I don't see how they can be mixed: each needs to be in control.

It's being converted now :)

> Does a set of file descriptors (writefds, readfds) even have any use
> in a libevent world?  Note: I'm asking from ignorance, not knowledge.

No. We were not asking to keep writefds/select, but whether by removing
this now empty fd, we were removing something in the design that we
missed porting. We didn't think so but we wanted to make sure.

Paul


More information about the Swan-dev mailing list