628
630
<p>Use <a class="el" href="classGio_1_1DBus_1_1Connection.html#ad841b9beb348c2e21dcb9e395ee4f28a" title="Gets the credentials of the authenticated peer.">Gio::DBus::Connection::get_peer_credentials()</a> to figure out what identity (if any), was authenticated.</p>
629
631
<p>If you want to accept the connection, keep a global reference to the connection (by keeping it in a global RefPtr<>) and return <code>true</code>. When you are done with the connection call <a class="el" href="classGio_1_1DBus_1_1Connection.html#a3e52adb1ec39322086ea46921086a6e5" title="Closes the connection.">Gio::DBus::Connection::close()</a>. Note that the other peer may disconnect at any time - a typical thing to do when accepting a connection is to listen to the <a class="el" href="classGio_1_1DBus_1_1Connection.html#a99d65f5ee4424eb0e48fd1725ff6ab37">Gio::DBus::Connection::signal_closed()</a> signal.</p>
630
632
<p>If <a class="el" href="classGio_1_1DBus_1_1Server.html#a461917cdc2a947da309a81759794b1d7" title="Flags for the server.">property_flags()</a> contains Gio::DBus::SERVER_FLAGS_RUN_IN_THREAD then the signal is emitted in a new thread dedicated to the connection. Otherwise the signal is emitted in the thread-default main loop of the thread that server was constructed in.</p>
631
<p>You are guaranteed that signal handlers for this signal runs before incoming messages on the connection are processed. This means that it's suitable to call <a class="el" href="classGio_1_1DBus_1_1Connection.html#a1d832792017aa4aa53205cc6082f50e1" title="Registers slots for exported objects at object_path with the D-Bus interface that is described in int...">Gio::DBus::Connection::register_object()</a> or similar from the signal handler.</p>
633
<p>You are guaranteed that signal handlers for this signal runs before incoming messages on the connection are processed. This means that it's suitable to call <a class="el" href="classGio_1_1DBus_1_1Connection.html#a0c2974543543686c386601b656577593" title="Registers slots for exported objects at object_path with the D-Bus interface that is described in int...">Gio::DBus::Connection::register_object()</a> or similar from the signal handler.</p>
632
634
<dl class="user"><dt><b>Prototype:</b></dt><dd><code>bool on_my_new_connection(const Glib::RefPtr<Connection>& connection)</code> </dd></dl>