Valadoc | Vala | Tutorial | API-References | Markup

queue_message


Description:

public virtual void queue_message (owned Message msg, SessionCallback? callback)

Queues the message msg for sending. All messages are processed while the glib main loop runs. If msg has been processed before, any resources related to the time it was last sent are freed.

Upon message completion, the callback specified in callback will be invoked (in the thread associated with session 's async context). If after returning from this callback the message has not been requeued, msg will be unreffed.

Parameters:

user_data a pointer passed to callback.
msg the message to queue
callback a SessionCallback which will be called after the message completes or when an unrecoverable error occurs.