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.
http://developer.gnome.org/libsoup/stable/libsoup-client-howto.html
Regards,
Brian
On Mon, Jan 2, 2012 at 3:14 PM, Emmanuel Rodriguez
<emmanuel rodriguez gmail com> wrote:
>
>
> 2012/1/2 Kaiser . <yahyai-0 hotmail com>
>>
>> Hello
>>
>> 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
>>
>> {
>> 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
> 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.
>
> --
> Emmanuel Rodriguez
>
> _______________________________________________
> libsoup-list mailing list
> libsoup-list gnome org
> http://mail.gnome.org/mailman/listinfo/libsoup-list
>
--
Regards,
-Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]