Re: SoupSessionAsync with ostream
- From: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
- To: "Kaiser ." <yahyai-0 hotmail com>
- Cc: libsoup-list gnome org
- Subject: Re: SoupSessionAsync with ostream
- Date: Tue, 3 Jan 2012 00:14:00 +0100
2012/1/2 Kaiser . <yahyai-0 hotmail com>
I wanted to use Libsoup to download some files from Internet ... Asynchronously ,
can I get some help? and can you explain to me how callback function works?
here what I have tried
session = soup_session_async_new();
msg = soup_message_new (SOUP_METHOD_GET, url);
// send the HTTP request
status = soup_session_send_message (session ,msg);
Can you try commenting the call to soup_session_send_message() ? This function will cause the message to be send synchronously and the response will be retrieved by your program at the moment. It will NOT be done asynchronously.
After this call the message will be already downloaded thus making the call to soup_session_queue_message() redundant.
I don't know what's the behavior of libsoup when a same message is sent twice. Perhaps this could explain why you don't get the expected results in your callback.
] [Thread Prev