Hi patrick, Thanks for the reply. On Mon, Mar 5, 2012 at 6:21 PM, Patrick Monnerat < [email protected]> wrote:
> > ankit Tripathi wrote: > > 2)"Unsupported protocol " .while waiting on socket for the receiving > > first it wait around 15 to 20 sec and then it trows the error.i am > > providing here the test application in which i am making https > > connection with google.com. after waiting on socket for 15-20 sec > > it throws the error 1)" Failed to get recent socket " > > 2)"Unsupported protocol " .i tried to googling but i didn't found > much. > > I suppose Google closed the connection while you are sleeping on > select(): there are odd things in your program that make me think so: > > 1) Your select() call monitors for events but neither for input nor for > output. > Actually this is the test application.in my application i have to wait until some request comes from the PEER.we can't use curl_easy_recv() untill the socket is not ready so here i am waiting on the select . > 2) You do not send data between connection and wait+read: the http(s) > protocol states (apart from SSL handshake) that the client must "speak" > first. > Did you mean that i should send some message to PEER before going to sleep on socket for receiving the msg from PEER.i also tried that thing .while setting the CURL_CONNECT_ONLY msg we don't allow any header to go to PEER.so manually i sent the header request " "GET / HTTP/1.0\r\nHost: google.com:443\r\n\r\n" to the PEER .but that trick also din not work. > 3) As a consequence, the only way to leave procedure wait_on_socket() is > to get an event on that socket, or after 60sec... But Google is not so > patient ;-) so you get your event telling that Google has closed the > connection. > in wait_on_socket () function i am waiting on select until any request occurs.as the last parameter i am passing the NULL select(sockfd + 1, &infd, &outfd, &errfd, NULL); > I hope it helps. > i have also mentioned the Verbose msg and error msg which i got in the earlier mail.please help me out. Thanks Ankit > Cheers, > Patrick > > ------------------------------------------------------------------- > List admin: http://cool.haxx.se/list/listinfo/curl-library > Etiquette: 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
