DBUS protocol on unix pipes?

nf2 nf2 at scheinwelt.at
Sat Jun 10 04:58:59 PDT 2006


Thiago Macieira wrote:
> nf2 wrote:
>   
>> Could DBUS be used on unix stdin/stdout pipes?
>>     
>
> Not out of the box, no. You'd need to hack support for that into the 
> source code, because you need two pipes to achieve bidirectionality.
>
> If you use a socketpair instead, you won't have this problem.
>
>   
Aah thanks. So i need to pass the filedescriptor as command line 
parameter to the child.

And then i have to use the following internal functions on both sides?

1) DBusTransport* _dbus_transport_new_for_fd (int  fd,  const DBusString 
*  server_guid,  const DBusString *  address) 

2) DBusConnection* _dbus_connection_new_for_transport (DBusTransport *   
transport )

But what should i put into the 'server_guid' and 'address' strings?

>> The second question is about "streaming" large amounts of file-data with
>> DBUS-one-way messages (signals). There might be a problem with flooding
>> the outgoing message queue in an async system, when the receiving side
>> is not picking up messages fast enough. Is there an easy way to check
>> the length of this queue?
>>     

Just to explain this more precisely: The required feature would be to 
receive a callback from DBusConnection when the outgoing message queue 
is empty - to pick up the next data-chunk (like dataReq in KIO).

Thanks,
Norbert




More information about the dbus mailing list