[ Version ( since = "2.42" ) ]
public async InputStream send_async (Message msg, Cancellable? cancellable = null) throws Error
Asynchronously sends msg
and waits for the beginning of a response.
When callback
is called, then either msg
has been sent, and its response headers received, or else an error
has occurred. Call send_async.end to get a InputStream for reading the
response body.
See send for more details on the general semantics.
Contrast this method with queue_message, which also asynchronously sends a Message, but doesn't invoke its callback until the response has been completely read.
(Note that this method cannot be called on the deprecated SessionSync subclass, and can only be called on SessionAsync if you have set the use_thread_context property.)
this |
a Session |
msg |
a Message |
cancellable |
a Cancellable |
callback |
the callback to invoke |
user_data |
data for |