| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
Re: Connection killed right after connect, Expire Cleared / Curl Error 56
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 8 Oct 2010 22:37:31 +0200 (CEST)
On Fri, 8 Oct 2010, m0n0 wrote:
> 1. The TCP connection is established in non-blocking mode.
For non-blocking connections, the POSIX rule is that when that socket turns
> 4. I assume that curl verifies the connection by checking if sending data to
Not exactly. After doing a non-blocking connect and the socket turned
This too is necessary for the connection to be verified as connected after
As you can see in that function, we have some precautions for platform-
> If that's true, that means cURL assumes that also recv can be entered,
The socket turned writable and the getsockopt() check are the only checks done
Before that, recv() will not be called since the connection isn't completed
> Here is an part of waitconnect() from select.c:
That's correct.
> I assume that the FreeMiNT kernel says: "Ok to send data", but when you try
Then the FreeMiNT kernel is not POSIX compliant and wrong. Which of course
It MUST mark the socket as writable when the TCP connection is complete and it
> Which is perfectly fine with non-blocking sockets.
No, it's most certainly not.
> I'm not quite sure, but I wouldn't describe this behavior as an bug.
If that is truly what happens, then I claim it is a socket API bug.
> What do you say about that? Wouldn't you say that it is an assumption by
Well, first it doesn't "enter recv()" immediately just because the socket
I must remind you that curl and libcurl run on MANY operating systems without
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-10-08 These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info