1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

40 Commits

Author SHA1 Message Date
Daniel Stenberg
130fac6c16 timeleft_accept: ack global timeout, moved to ftp.c
First off the timeout for accepting a server connect back must of course
respect a global timeout. Then the timeleft function is only used by ftp
code so it was moved to ftp.c and made static.
2011-12-20 20:55:54 +01:00
Gokhan Sengun
c834213ad5 FTP: perform active connections non-blocking
1- Two new error codes are introduced.

CURLE_FTP_ACCEPT_FAILED to be set whenever ACCEPTing fails because of
FTP server connected.

CURLE_FTP_ACCEPT_TIMEOUT to be set whenever ACCEPTing timeouts.

Neither of these errors are considered fatal and control connection
remains OK because it could just be a firewall blocking server to
connect to the client.

2- One new setopt option was introduced.

CURLOPT_ACCEPTTIMEOUT_MS

It sets the maximum amount of time FTP client is going to wait for a
server to connect. Internal default accept timeout is 60 seconds.
2011-12-20 20:30:02 +01:00
Daniel Stenberg
9109cdec11 Curl_socket: internal replacement for socket()
Moved out into a separate function to work as a "generic" socket()
replacement.
2011-12-05 10:58:38 +01:00
Yang Tse
6b75d2c2df fix a bunch of MSVC compiler warnings 2011-09-03 16:07:09 +02:00
Yang Tse
2ccffbb37e BSD-style lwIP TCP/IP stack support - followup
lwIP library initialization.
2011-08-07 08:45:57 +02:00
Daniel Stenberg
b5d170b551 CLOSESOCKETFUNCTION: added
Introduced the initial setup to allow closesocket callbacks by making
sure sclose() is only ever called from one place in the libcurl source
and still run all test cases fine.
2011-05-18 22:56:46 +02:00
Daniel Stenberg
adb49ad8bb Curl_timeleft: s/conn/data in first argument
As the function doesn't really use the connectdata struct but only the
SessionHanadle struct I modified what argument it wants.
2011-01-04 23:13:10 +01:00
Yang Tse
11cddb68e0 fix getinfo CURLINFO_LOCAL* for reused connections (take 2) 2010-11-30 22:14:37 +01:00
Daniel Stenberg
c6fa1952a1 portabilty: use proper variable type to hold sockets
Curl_getconnectinfo() is changed to return a proper curl_socket_t for
the last socket so that it'll work more portably (and cause less
compiler warnings).
2010-09-06 00:02:54 +02:00
Yang Tse
f737e94164 Curl_updateconninfo() error handling fix 2010-06-07 16:53:31 +02:00
Frank Meier
8098d9417c getinfo: added *_PRIMARY_PORT, *_LOCAL_IP and *_LOCAL_PORT 2010-06-05 00:31:36 +02:00
Daniel Stenberg
2309b4e330 remove the CVSish $Id$ lines 2010-03-24 11:02:54 +01:00
Daniel Stenberg
d709cb2ae3 - Eric Wong introduced curlx_nonblock() that the curl tool now (re-)uses for
setting a file descriptor non-blocking. Used by the functionality Eric
  himself brough on June 15th.
2009-07-09 21:47:24 +00:00
Daniel Stenberg
9c788a529b - Made the SO_SNDBUF setting for the data connection socket for ftp uploads as
well. See change 28 Apr 2009.
2009-05-07 20:00:44 +00:00
Daniel Stenberg
d0b8b5a199 - Bug #2218480 (http://curl.haxx.se/bug/view.cgi?id=2218480) pointed out a
problem with my CURLINFO_PRIMARY_IP fix from October 7th that caused a NULL
  pointer read. I also took the opportunity to clean up this logic (storing of
  the connection's IP address) somewhat as we had it stored in two different
  places and ways previously and they are now unified.
2008-11-03 16:24:56 +00:00
Daniel Stenberg
514592b892 - Introducing curl_easy_send() and curl_easy_recv(). They can be used to send
and receive data over a connection previously setup with curl_easy_perform()
  and its CURLOPT_CONNECT_ONLY option. The sendrecv.c example was added to
  show how they can be used.
2008-05-12 21:43:24 +00:00
Daniel Stenberg
1b701c746f - Refactored a lot of timeout code into a few functions in an attempt to make
them all use the same (hopefully correct) logic to make it less error-prone
  and easier to introduce library-wide where it should be used.
2008-02-07 22:25:04 +00:00
Yang Tse
a1d5983991 use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handling 2007-02-16 18:19:35 +00:00
Gisle Vanem
c4ad533300 Constify some arguments in Curl_connecthost() and singleipconnect(). 2006-07-21 06:50:39 +00:00
Daniel Stenberg
e85e30546c Roland Blom filed bug report #1481217
(http://curl.haxx.se/bug/view.cgi?id=1481217), with follow-ups by Michele Bini
and David Byron. libcurl previously wrongly used GetLastError() on windows to
get error details after socket-related function calls, when it really should
use WSAGetLastError() instead.

When changing to this, the former function Curl_ourerrno() is now instead
called Curl_sockerrno() as it is necessary to only use it to get errno from
socket-related functions as otherwise it won't work as intended on Windows.
2006-05-04 22:39:47 +00:00
Daniel Stenberg
c4ff5eb0ca conn->ip_addr MUST NOT be used on re-used connections 2005-01-29 13:07:16 +00:00
Daniel Stenberg
ba40eccc90 make the SSL connect use the same default connect timeout define as the
generic connect uses
2004-06-30 09:22:48 +00:00
Daniel Stenberg
808621ab22 corrected the Curl_is_connected() proto 2004-06-29 11:21:05 +00:00
Daniel Stenberg
c39858aac0 Source cleanups. The major one being that we now _always_ use a Curl_addrinfo
linked list for name resolved data, even on hosts/systems with only IPv4
stacks as this simplifies a lot of code.
2004-06-24 07:43:48 +00:00
Daniel Stenberg
ce5805a955 Use curl_socket_t instead of int for holding sockets. The typedefs and
defines are in setup.h.
2004-03-09 22:52:50 +00:00
Daniel Stenberg
053f6c85ef updated year in the copyright string 2004-01-07 09:19:33 +00:00
Daniel Stenberg
65dab79ca5 gcc -Wshadow complaints fixed 2003-10-18 20:14:33 +00:00
Daniel Stenberg
eb6130baa7 ourerrno became Curl_ourerrno() and is now available to all libcurl 2003-05-01 13:37:05 +00:00
Daniel Stenberg
f26a338a54 copyright year update in the source header 2003-01-16 21:08:12 +00:00
Daniel Stenberg
2cff251863 Curl_resolv() now returns a different struct, and it contains a reference
counter so that the caller needs to decrease that counter when done with
the returned data.

If compiled with MALLOCDEBUG I've added some extra checking that the counter
is decreased before a handle is closed etc.
2002-11-05 10:51:41 +00:00
Daniel Stenberg
ba4e69bebc updated source code boilerplate/header 2002-09-03 11:52:59 +00:00
Daniel Stenberg
cb895ec335 Initial fix to make the multi interface return control while waiting for
the initial connect to "come through".

This should work fine for connect and for FTP-PASV connects. Needs massive
testing.
2002-08-12 09:43:20 +00:00
Daniel Stenberg
974f314f57 copyright string (year) update 2002-03-19 07:54:55 +00:00
Daniel Stenberg
d0c1f3e25b long port => int port, as the c source uses! (Miklos Nemeth found this) 2001-11-19 20:08:01 +00:00
Daniel Stenberg
b07e2a08f9 nonblock => Curl_nonblock, remade the check for a live SSL connection (again) 2001-10-31 08:44:11 +00:00
Daniel Stenberg
fdeaae678d SM's patch applied, we should not use arguments or variables that have the
same name as common functions...
2001-10-05 06:05:56 +00:00
Daniel Stenberg
51ca5fcbe0 major connecting updates 2001-10-02 09:40:06 +00:00
Daniel Stenberg
6918427fae conn->hp is now conn->hostaddr
changed the Curl_connethost() proto again
2001-10-01 22:32:37 +00:00
Daniel Stenberg
d0079d9054 fixed the connecthost proto: added the timeout argument 2001-10-01 11:26:21 +00:00
Daniel Stenberg
c5fdeef41d introduced non-blocking connects 2001-10-01 08:59:17 +00:00