aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
AgeCommit message (Collapse)Author
2007-10-04Kim Rinnewitz reported that --local-port didn't work with TFTP transfers.Daniel Stenberg
This happened because the tftp code always uncondionally did a bind() without caring if one already had been done and then it failed. I wrote a test case (1009) to verify this, but it is a bit error-prone since it will have to pick a fixed local port number and since the tests are run on so many different hosts in different situations I add it in disabled state.
2007-10-03exported symbols must use lowercase "curl_", and I also fixed two compilerDaniel Stenberg
warnings, one C99 thing and the bad pointer sent to the callback
2007-10-03Alexey Pesternikov introduced CURLOPT_OPENSOCKETFUNCTION andDaniel Stenberg
CURLOPT_OPENSOCKETDATA to set a callback that allows an application to replace the socket() call used by libcurl. It basically allows the app to change address, protocol or whatever of the socket. (I also did some whitespace indent/cleanups in lib/url.c which kind of hides some of these changes, sorry for mixing those in.)
2007-09-05Minix doesn't support getsockopt on UDP sockets or send/recv on TCPDan Fandrich
sockets.
2007-08-30Renamed several libcurl error codes and options to make them more generalDan Fandrich
and allow reuse by multiple protocols. Several unused error codes were removed. In all cases, macros were added to preserve source (and binary) compatibility with the old names. These macros are subject to removal at a future date, but probably not before 2009. An application can be tested to see if it is using any obsolete code by compiling it with the CURL_NO_OLDIES macro defined. Documented some newer error codes in libcurl-error(3)
2007-08-02Patrick Monnerat's cleanup fix after my alloc-strings commitDaniel Stenberg
2007-08-01Patrick Monnerat and I modified libcurl so that now it *copies* all stringsDaniel Stenberg
passed to it with curl_easy_setopt()! Previously it has always just refered to the data, forcing the user to keep the data around until libcurl is done with it. That is now history and libcurl will instead clone the given strings and keep private copies.
2007-07-13Colin Hogben filed bug report #1750274Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1750274) and submitted a patch for the case where libcurl did a connect attempt to a non-listening port and didn't provide a human readable error string back.
2007-07-13Daniel Cater made libcurl build with CURL_NO_OLDIES defined (which doesn'tDaniel Stenberg
define the symbols for backwards source compatibility)
2007-07-11removed now obsolete NETDB_DEFINE_CONTEXT macro calls.Gunter Knauf
2007-06-30minor patches to enable building for NetWare CLIB.Gunter Knauf
sent by Dmitry Mityugov.
2007-04-22Avoid an unnecessary call to gettimeofday() whenYang Tse
using custom timeout values.
2007-04-19fix comment and line spacingYang Tse
2007-04-16- Robert Iakobashvil added curl_multi_socket_action() to libcurl, which is aDaniel Stenberg
function that deprecates the curl_multi_socket() function. Using the new function the application tell libcurl what action that was found in the socket that it passes in. This gives a significant performance boost as it allows libcurl to avoid a call to poll()/select() for every call to curl_multi_socket*().
2007-03-26Internal function Curl_select() renamed to Curl_socket_ready()Yang Tse
2007-03-13Use Curl_inet_pton() instead of inet_pton().Gisle Vanem
2007-03-11fix compiler warning: unused variableYang Tse
2007-03-09- Robert Iakobashvili fixed CURLOPT_INTERFACE for IPv6.Daniel Stenberg
2007-02-26Removed inclusion of <sys/types.h> and <sys/stat.h> in .c-filesGisle Vanem
since they're already included through "setup.h".
2007-02-22Check for stdbool.h at configuration stage, and include it if available.Yang Tse
Check for lowercase 'bool' type at configuration stage. If not available provide a suitable replacement with a type definition of 'unsigned char' in setup_once.h Move definitions of TRUE and FALSE to setup_once.h
2007-02-21curlassert macro replaced with DEBUGASSERT macro defined in setup_once.hYang Tse
2007-02-17Move portable error number symbolic name definitions to setup_once.hYang Tse
2007-02-16use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handlingYang Tse
2007-02-05- Michael Wallner provided a patch that adds support for CURLOPT_TIMEOUT_MSDaniel Stenberg
and CURLOPT_CONNECTTIMEOUT_MS that, as their names should hint, do the timeouts with millisecond resolution instead. The only restriction to that is the alarm() (sometimes) used to abort name resolves as that uses full seconds. I fixed the FTP response timeout part of the patch. Internally we now count and keep the timeouts in milliseconds but it also means we multiply set timeouts with 1000. The effect of this is that no timeout can be set to more than 2^31 milliseconds (on 32 bit systems), which equals 24.86 days. We probably couldn't before either since the code did *1000 on the timeout values on several places already.
2006-12-22- David McCreedy fixed a bad call to getsockname() that wrongly used a size_tDaniel Stenberg
variable to point to when it should be a socklen_t.
2006-10-18Check for USE_WINSOCK instead of WIN32 where the check was doneYang Tse
to verify winsock API availability.
2006-08-30Removed "#ifndef__WATCOMC__". Use "#ifdef HAVE_SYS_TIME_H" instead.Gisle Vanem
2006-08-29Watcom lacks <sys/time.h>.Gisle Vanem
2006-08-29David McCreedy added CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA toDaniel Stenberg
allow applications to set their own socket options.
2006-07-21Constify some arguments in Curl_connecthost() and singleipconnect().Gisle Vanem
2006-07-17"*connected" must be set to FALSE if trynextip() fails.Yang Tse
2006-07-14Change the ai_addrlen type of struct addrinfo from size_t to socklen_t, per ↵Yang Tse
RFC 3493.
2006-07-11Socket must be set to CURL_SOCKET_BAD after closing it.Yang Tse
2006-05-04Roland Blom filed bug report #1481217Daniel Stenberg
(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-04-21Ale Vesely fixed CURLOPT_INTERFACE when using a hostnameDaniel Stenberg
2006-04-18avoid a warning about declaring a variable that shadows an earlier declaredDaniel Stenberg
one
2006-04-10First curl_multi_socket() commit. Should primarily be considered as an internalDaniel Stenberg
code rearrange to fit the future better.
2006-02-26Small fix.Gisle Vanem
2006-02-26Use getprotobyname() to retrieve protocol number for TCPGisle Vanem
(sorry, I don't know how to add this to the configure process).
2006-01-30Squelch the "warning: 'port' might be used uninitialized in this function".Gisle Vanem
(occurs w/o ENABLE_IPV6).
2006-01-30Added CURLOPT_LOCALPORT and CURLOPT_LOCALPORTRANGE to libcurl. Set with theDaniel Stenberg
curl tool with --local-port. Plain and simply set the range of ports to bind the local end of connections to. Implemented on to popular demand. Not extensively tested. Please let me know how it works.
2005-12-18Cleanup windows header includes. Where aplicable, inclusion ofYang Tse
windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h
2005-12-13Fixed some compiler warnings on lcc.Dan Fandrich
2005-10-25close the existing socket when trying next IP, as otherwise we leak one!Daniel Stenberg
bug #1326306
2005-09-16keep 'socktype' in the connectdata struct and make sure we use that for allDaniel Stenberg
protocol sockets even if the resolved address may say otherwise
2005-09-02John Kelly added TFTP support to libcurl. A bunch of new error codes wasDaniel Stenberg
added. TODO: add them to docs. add TFTP server to test suite. add TFTP to list of protocols whereever those are mentioned.
2005-07-21Fixed some typos in output messages.Dan Fandrich
2005-05-14fix warning about redefined symbolDaniel Stenberg
2005-05-14Change for systems with >1 ways of setting (non-)blockingGisle Vanem
mode. (djgpp/Watt-32 has 3 ways). Should rewrite this using "#elif ..", but maybe there is still broken cpp around?
2005-05-02improved failf() error messagesDaniel Stenberg