dbus - How to use DBusWatch functions to receive asynchronous requests? -


i've seen program illustrated in dbuswatch , dbustimeout examples, don't understand why following code used in dispatch() function:

while (dbus_connection_get_dispatch_status(c) == dbus_dispatch_data_remains)     dbus_connection_dispatch(c); 

the dbus_connection_dispatch() triggers top level main loop action in dbus library in turn dispatch steps of actions other functions. actual bus message receiving should in user handler function.

it can example on the bind9 code apple. message handling triggered in these steps according reading:

  • the select() returns in main loop fd set dbus watch.
  • the main loop calls process_watches() walks tree , call process_watch().
  • in end, looks dbus message handled call through

    (*(cs->mf)) ( cs, type, reply, serial, dest, path, member, interface, 0l, sender, signature, message, 0l, 0l, 0l, cs->def_mf_obj);

the cs->mf should holding user handler function added dbus_svc_add_filter().


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -