Re: SoupSessionAsync with ostream
- From: bsquared <bwcode4u gmail com>
- To: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
- Cc: libsoup-list gnome org
- Subject: Re: SoupSessionAsync with ostream
- Date: Mon, 2 Jan 2012 16:50:04 -0800
You may find an answer here, I did.
On Mon, Jan 2, 2012 at 3:14 PM, Emmanuel Rodriguez
<emmanuel rodriguez gmail com> wrote:
> 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
>> here what I have tried
>> SoupSession *session;
>> SoupMessage *msg;
>> guint status;
>> 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
> 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.
> Emmanuel Rodriguez
> libsoup-list mailing list
> libsoup-list gnome org
] [Thread Prev