DBusServer accepted client close
Andy Green
andy at warmcat.com
Thu Oct 4 09:10:06 UTC 2018
Hi -
I have a server using DBusServer, and the necessary Watch and Timeout
adaptations to work with a different event loop.
I can connect to the server over an abstract unix domain socket, it will
"accept" a new connection and I can deal with the messages there, which
is all good.
However, I am at a loss to understand when the accepted server
connection is closing. I know when it is created / accepted, because
there's a callback for that. A struct should be associated with the
connection then.
But the other callbacks seem related to lifecycle of Watch and Timeout,
which is lower-level than the end of the accepted DBusConnection. When
I create the connection using eg gdbus, stuff that I allocate that I
want to associate with the connection, has no obvious event on which it
can be deallocated because the connection has ended. The "connection"
lifetime ends when gdbus is exiting, just like I can observer the
connection lifetime started when gdbus started, does it? How can I feel
that in my DBusServer-based server?
Did I miss the point somewhere? Am I looking at this the wrong way somehow?
Thanks for any advice.
-Andy
More information about the dbus
mailing list