Re: gobject across network



hi;

On 16 June 2013 17:24, Andrea Zagli <azagli libero it> wrote:
is there a way to send a gobject from a server to a client via network (ex.
via http or other protocol)?

i want to create a gobject in a daemon in a server and pass it to a client

if you're doing in on the same machine, then you can use DBus and the
GDBus facilities in GIO. [0]

if you want to just send an object representing state from one process
on one machine, to another process on another machine, you can
serialize the instance on the server and deserialize it on the client;
you can use whatever interchange format you want — I have a soft spot
for JSON, so you can check out JSON-GLib, which has facilities for the
serialization/deserialization passes. [1]

if you want to invoke methods, on the other hand, you may want to have
a look at an RPC system, like the XML-RPC API exposed by LibSoup. [2]

ciao,
 Emmanuele.

[0] https://developer.gnome.org/gio/stable/gdbus-convenience.html
[1] https://developer.gnome.org/json-glib/0.16/json-glib-GObject-Serialization.html
[2] https://developer.gnome.org/libsoup/stable/libsoup-2.4-XMLRPC-Support.html

--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]