Missing the AF_BUS
Missing the AF_BUS
Posted Jul 6, 2012 6:58 UTC (Fri) by Fowl (subscriber, #65667)In reply to: Missing the AF_BUS by smurf
Parent article: Missing the AF_BUS
Posted Jul 6, 2012 16:18 UTC (Fri)
by smurf (subscriber, #17840)
[Link]
dbus_connection_get_unix_fd() returns exactly one file descriptor. If you open a direct connection to some application, you have more than one file descriptor. How do you make your application select()/poll() on both (or more) of these?
How would you propose to handle the monitoring problem? Let the daemon send a "somebody's listening for messages X, so if you exchange any of those privately, kindly send me a copy" commands to each and every client? Owch.
I'm not saying this cannot be done. I'm saying it's heaps more work, and more fragile, than simply moving the main chunk of this into the kernel, especially since there's already code which does that. And code is more authoritative than English.
Missing the AF_BUS
Admittedly, on second thought, you could do it with epoll(). But it's still a change in semantics (you can't read from that file descriptor; worse, you can't write to it).