Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
outstanding queries, and processing a DNS response packet was O(n) in the
number of outstanding queries. To speed things up in Google, we added a few circular,
doubly-linked lists of queries that are hash-bucketed based on
the attributes we care about, so most important operations are now O(1).
It might be that the number of buckets are higher than most people would need,
but on a quick calculation it should only be 100kB or so even on a 64-bit
system, so I've let it stay as-is.
|
|
|
|
tree.)
|
|
having to run the entire event loop once per packet. (Patch from the Google tree.)
|
|
send_queue; however, they are slightly different and only the first one properly uses a while loop. Consolidate both into a single function that DTTR. (Patch from the Google tree.)
|
|
|
|
(Patch from the Google tree.)
|
|
the execution of a query, and update documentation accordingly. (Patch from the Google tree.)
|
|
while queued for transmission, note broken servers and close them in the main loop, and store TCP socket generation number in order not to send the same query twice over the same socket.
|
|
|
|
is non-NULL before we FD_CLR
|
|
both to occur
|
|
several functions (write_tcp_data, read_tcp_data, read_udp_packets) so that
if it fails and the socket is closed the following code doesn't try to use
the file descriptor.
|
|
TCP is used since there are several edge cases where it still makes sense.
|
|
|
|
He also made recent Microsoft compilers use _strdup() instead of strdup().
|
|
specific sockets and thus avoiding select() and associated functions/macros.
This function will be used by upcoming libcurl releases for this very
reason. It also made me export the ares_socket_t type in the public ares.h
header file, since ares_process_fd() uses that type for two of the arguments.
|
|
since it's already included through "setup.h".
|
|
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
|
|
|
|
|
|
|
|
|
|
to verify winsock API availability.
|
|
o made ares_version.h use extern "C" for c++ compilers
o fixed compiler warnings in ares_getnameinfo.c
o fixed a buffer position init for TCP reads
|
|
|
|
|
|
|
|
|
|
UDP even when a poll(2) or select(2) suggest otherwise.
|
|
c-ares call a callback on socket state changes. A better way than the
ares_getsock() to get full control over the socket state.
|
|
rearrangement in ares_process.c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Make UDP sockets non-blocking. I've confirmed that at least on Linux 2.4 a
read event can come back from poll() on a valid SOCK_DGRAM socket but
recv(2) will still block. This patch doesn't ignore EAGAIN in
read_udp_packets(), though maybe it should. (This patch was edited by Daniel
Stenberg and a new configure test was added (imported from curl's configure)
to properly detect what non-blocking socket approach to use.)
|
|
X.
|
|
|
|
|
|
|
|
sets the required HAVE_xx defines for non-DOS/Win targets.
|
|
|
|
Basically in loops like handle_errors(), 'query->next' was assigned a local
variable and then query was referenced after the memory was freed by
next_server(). I've changed that so next_server() and end_query() returns the
next query. So callers should use this ret-value.
The next problem was that 'server->tcp_buffer_pos' had a random value at entry
to 1st recv() (luckily causing Winsock to return ENOBUFS).
I've also added a ares_writev() for Windows to streamline the code
a bit more.
|
|
check for ssize_t to make it possible to use that when receiving the send()
error code. This is necessary to prevent compiler warnings on some systems.
- Made configure create config.h, and all source files now include setup.h that
might include the proper config.h (or a handicrafted alternative).
- Switched to 'ares_socket_t' type for sockets in ares, since Windows don't
use 'int' for that.
- automake-ified and libool-ified c-ares. Now it builds libcares as a shared
lib on most platforms if wanted. (This bloated the size of the release
archive with another 200K!)
- Makefile.am now uses Makefile.inc for the c sources, h headers and man
pages, to make it easier for other makefiles to use the exact same set of
files.
- Adjusted 'maketgz' to use the new automake magic when building distribution
archives.
|