Closes this.
Note that this never causes the process to exit (this might only happen if the other end of a shared message bus connection disconnects, see exit_on_close).
Once the connection is closed, operations such as sending a message will return with the error g_io_error_closed. Closing a connection will not automatically flush the connection so queued messages may be lost. Use flush if you need such guarantees.
If this is already closed, this method fails with g_io_error_closed.
When this has been closed, the on_closed signal is emitted in the thread-default main context of the thread that this was constructed in.
This is an asynchronous method. When the operation is finished, callback
will be invoked in the thread-default main
context of the thread you are calling this method from. You can then call close.end to get the result of
the operation. See close_sync for the synchronous version.
this | |
cancellable |
a Cancellable or null |
callback |
a TaskReadyCallback to call when the request is satisfied or null if you don't care about the result |
user_data |
The data to pass to |