Hi, <div><br></div><div>For my semester project i am using dbus for interprocess communication between different services. Everything is working fine when all the services are on a single host.</div><div><br></div><div>I am wondering if i can run my services on different host using dbus over tcp??? I dig out this mailing list and found that some people have done this  and using that information i tried to run a server(have a function which add two number ) and client (right now on same host but using dbus tcp) </div>
<div><br></div><div><br>
</div><div><div>My session-local.conf looks like this: </div><div><br></div><div><br></div><div>&lt;busconfig&gt;</div><div>  &lt;type&gt;session&lt;/type&gt;</div><div>  &lt;listen&gt;tcp:host=localhost,port=1234&lt;/listen&gt;</div>
<div>  &lt;listen&gt;unix:tmpdir=/tmp&lt;/listen&gt;</div><div>&lt;/busconfig&gt;</div></div><div><br></div><div>Main part of my server : </div><div><br></div><div>g_type_init();</div><div>mainloop = g_main_loop_new (NULL, FALSE);</div>
<div>*connection = dbus_g_bus_get (DBUS_BUS_SESSION, &amp;error);</div><div>dbus_connection_set_allow_anonymous((DBusConnection*)connection,TRUE);<span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">*bus_proxy = dbus_g_proxy_new_for_name (connection,
                                          DBUS_SERVICE_DBUS,
                                          DBUS_PATH_DBUS,
                                          DBUS_INTERFACE_DBUS);</span></div><div><span class="Apple-tab-span" style="white-space:pre">if (!dbus_g_proxy_call (bus_proxy, &quot;RequestName&quot;, &amp;error,
                                G_TYPE_STRING, service_name,
                                G_TYPE_UINT, DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER,
                                G_TYPE_INVALID,
                                G_TYPE_UINT, &amp;request_name_result,
                                G_TYPE_INVALID)) {
                        printf (&quot;Failed to register %s&quot;,service_name);
                        lose_gerror(&quot;&quot;,error);
                }</span></div><div><span class="Apple-tab-span" style="white-space:pre">obj = g_object_new (SOME_TYPE_OBJECT, NULL);
dbus_g_connection_register_g_object (connection, &quot;/project/demo/remote&quot;, G_OBJECT (obj));
g_main_loop_run (mainloop);</span></div><div><span class="Apple-tab-span" style="white-space:pre"><br></span></div><div>Above code is working fine .</div><div><br></div><div>My client :</div><div><br></div><div><div>  gchar * server = g_strdup_printf (&quot;tcp:host=localhost,port=1234&quot;);<span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div> *connection = dbus_g_connection_open (server, &amp;error);</div></div><div><br></div><div><div>add_object = dbus_g_proxy_new_for_name (connection,</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>     DBUS_REMOTE_SERVICE1,</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>     DBUS_REMOTE_OBJECT,</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>     DBUS_REMOTE_INTERFACE1);</div></div><div><br></div>
<div><div>if (!dbus_g_proxy_call (add_object, &quot;Add&quot;, &amp;error,</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>  G_TYPE_INT, a,G_TYPE_INT,b, G_TYPE_INVALID,</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>  G_TYPE_INT, &amp;result, G_TYPE_INVALID))</div>
<div>        <span class="Apple-tab-span" style="white-space:pre">                </span>lose_gerror (&quot;Failed to complete Addition&quot;, error);</div></div><div><br></div><div>While running client code i am getting following error:</div>
<div><br></div><div>Failed to complete Addition: Connection was disconnected before a reply was received</div><div><br></div><div>I am stuck here . Is this the issue of  authentication ??? or i am missing something???</div>
<div> </div><div>-Rajeev</div><div><br></div><div>PS : I am newbie in dbus, so please point out if i am doing something stupid.</div><div><br></div><div><br></div>