Session.addOnRequestQueued

Emitted when a request is queued on @session. (Note that "queued" doesn't just mean soup_session_queue_message(); soup_session_send_message() implicitly queues the message as well.)

When sending a request, first #SoupSession::request_queued is emitted, indicating that the session has become aware of the request.

Once a connection is available to send the request on, the session emits #SoupSession::request_started. Then, various #SoupMessage signals are emitted as the message is processed. If the message is requeued, it will emit #SoupMessage::restarted, which will then be followed by another #SoupSession::request_started and another set of #SoupMessage signals when the message is re-sent.

Eventually, the message will emit #SoupMessage::finished. Normally, this signals the completion of message processing. However, it is possible that the application will requeue the message from the "finished" handler (or equivalently, from the soup_session_queue_message() callback). In that case, the process will loop back to #SoupSession::request_started.

Eventually, a message will reach "finished" and not be requeued. At that point, the session will emit #SoupSession::request_unqueued to indicate that it is done with the message.

To sum up: #SoupSession::request_queued and #SoupSession::request_unqueued are guaranteed to be emitted exactly once, but #SoupSession::request_started and #SoupMessage::finished (and all of the other #SoupMessage signals) may be invoked multiple times for a given message.

class Session
gulong
addOnRequestQueued
(
void delegate dlg
,
ConnectFlags connectFlags = cast(ConnectFlags)0
)

Meta

Since

2.24