demarshalling messages

Dafydd Harries daf at
Fri Mar 23 06:10:18 PDT 2007

Ar 23/03/2007 am 09:03, ysgrifennodd Havoc Pennington:
> Hi,
> Dafydd Harries wrote:
> >
> > - get the marshalled form of the DBusMessage so that I can encapsulate it 
> > for
> >   the network transport I'm using
> >
> > - take a marshalled message from a network transport I have and turn it 
> > into
> >   a DBusMessage object so that I can send it to my local clients
> >

> The bad hack approach, perhaps, would be to create a DBusConnection 
> around a socketpair() pipe, and serialize/unserialize messages by 
> pushing them into the pipe then reading the other end. Unfortunately I 
> think the pipe transport is only compiled into the --enable-tests 
> version of dbus, not the production build. But for OLPC you could do 
> your own build.
> It's messy any way you look at it, probably.

Another hack I thought of would be to connect to my own service directly over
a unix sockets, and use it to send/receive messages (doesn't rely on the
socketpair transport). We'd really like this mechanism to be useful outside of

A completely different approach would be to serialise DBusMessage to/from XML,
but this would be less bandwidth-efficient and more code than just using DBus'
own marshalling.


More information about the dbus mailing list