curl-library
Re: Getting the error Failed to get recent socket, Unsupported protocol while establishing HTTPS connection
Date: Mon, 5 Mar 2012 21:04:41 +0530
Hi Daniel,
Thanks for the reply.
On Mon, Mar 5, 2012 at 6:16 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 5 Mar 2012, ankit Tripathi wrote:
>
> I am trying to establish HTTPS connection with some url by using libcurl.
>> For sending and receiving message i am using curl_easy_send and curl_easy
>> _recv
>>
>
> I strongly suggest you reconsider that choice. Use the "proper" API for
> any protocol that libcurl supports. curl_easy_send and curl_easy_recv are
> meant to be used only in the rare and special situations when you need to
> implement another protocol (and even then you should reconsider why using
> libcurl at all if you don't need libcurl's features that much).
>
> sorry.i couldn't understand properly what you suggested.Did you mean to
> say that curl_easy_send and curl_easy_recv would not work while
> establishing a https connection .should i choose some different way to
> implement my application.
>
> .i am to able to send the msg . after waiting on the wait_on_socket
>> function for receiving the response from PEER it is throwing the error 1) "
>> Failed to get recent socket "
>>
>
> That means the socket was closed already and couldn't be provide to the
> application by libcurl. Using VERBOSE could possibly tell some more.
I set the VERBOSE option and after performing the curl_easy_recv() i got
the msg on the console was
" Failed to get recent socket "
>
>
> 2)"Unsupported protocol " .while waiting on socket for the receiving first
>> it wait around 15 to 20 sec and then it trows the error.
>>
>
> What error code do you get from curl_easy_recv() ?
> the error code which i get is
>
"CURLE_UNSUPPORTED_PROTOCOL"
i am also printing these error msg
printf("\nerror in recv %s \n",curl_easy_strerror(res));
the o/p is
"Unsupported protocol"
> And i had also set the CURL_ERRORBUFFER option and the o/p is
>
"Failed to get recent socket"
Thanks
Ankit
> / daniel.haxx.se
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-05