aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
AgeCommit message (Collapse)Author
2008-05-12- Introducing curl_easy_send() and curl_easy_recv(). They can be used to sendDaniel Stenberg
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-03- Jean-Francois Bertrand reported a libcurl crash with CURLOPT_TCP_NODELAYDaniel Stenberg
since libcurl used getprotobyname() and that isn't thread-safe. We now switched to use IPPROTO_TCP unconditionally, but perhaps the proper fix is to detect the thread-safe version of the function and use that. http://curl.haxx.se/mail/lib-2008-05/0011.html
2008-05-01- Bart Whiteley provided a patch that made libcurl work properly when an appDaniel Stenberg
uses the CURLOPT_OPENSOCKETFUNCTION callback to create a unix domain socket to a http server.
2008-04-22Added support for running on Symbian OS.Dan Fandrich
2008-02-07- Refactored a lot of timeout code into a few functions in an attempt to makeDaniel Stenberg
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-01-08Change typecast due to ↵Yang Tse
http://cool.haxx.se/cvs.cgi/curl/include/curl/curl.h.diff?r1=1.336&r2=1.337
2007-11-05removed space after if and while before the parenthesis for better source codeDaniel Stenberg
consistency
2007-10-17Fix compiler warning: signed and unsigned type in conditional expressionYang Tse
2007-10-17Fix compiler warning: comparison between signed and unsignedYang Tse
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.