flush


Description:

public async bool flush (Cancellable? cancellable = null) throws Error

Asynchronously flushes this, that is, writes all queued outgoing message to the transport and then flushes the transport (using flush_async).

This is useful in programs that wants to emit a D-Bus signal and then exit immediately. Without flushing the connection, there is no guaranteed that the message has been sent to the networking buffers in the OS kernel.

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 flush.end to get the result of the operation. See flush_sync for the synchronous version.

Parameters:

this

a DBusConnection

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 callback