[Top][All Lists]

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

Re: [GNUnet-developers] DBus in GNUnet?

From: Andrew Cann
Subject: Re: [GNUnet-developers] DBus in GNUnet?
Date: Thu, 07 Nov 2013 11:45:52 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130911 Thunderbird/17.0.9

By "hell of a lot easier" this is an example of what I mean: I've been
working on a GNUnet library for nodejs. Just to do something simple like
query the arm service for a list of services involves writing pages of
code to read the config file, find the socket arm is listening on, pack
up and send a GNUNET_ARM_Message then listen for a response and parse it.

By contrast, if it was using dbus, an entire script to list the running
services would look like this:

    var dbus = require("dbus-native");
    var systemBus = dbus.systemBus();
"org.gnunet.arm", function(err, arm) {
        arm.request_service_list(function(err, list) {
            console.log(list); // list is an array of service names

reply via email to

[Prev in Thread] Current Thread [Next in Thread]