28 #ifdef HAVE_SYS_TYPES_H
29 #include <sys/types.h>
31 #ifdef HAVE_SYS_SOCKET_H
32 #include <sys/socket.h>
91 #define CURL_MULTI_HANDLE 0x000bab1e
93 #define GOOD_MULTI_HANDLE(x) ((x)&&(((struct Curl_multi *)x)->type == CURL_MULTI_HANDLE))
94 #define GOOD_EASY_HANDLE(x) (x)
118 multi = (
void *)malloc(
sizeof(
struct Curl_multi));
131 return (
CURLM *) multi;
232 fd_set *read_fd_set, fd_set *write_fd_set,
233 fd_set *exc_fd_set,
int *max_fd)
249 switch(easy->
state) {
256 if(this_max_fd > *max_fd)
257 *max_fd = this_max_fd;
270 FD_SET(sockfd, write_fd_set);
279 FD_SET(sockfd, write_fd_set);
282 if((
int)sockfd > *max_fd)
283 *max_fd = (
int)sockfd;
291 read_fd_set, write_fd_set,
292 exc_fd_set, &this_max_fd);
295 if(this_max_fd > *max_fd)
296 *max_fd = this_max_fd;
316 *running_handles = 0;
324 fprintf(stderr,
"HANDLE %p: State: %x\n",
325 (
char *)easy, easy->
state);
328 if (CURLM_STATE_WAITCONNECT <= easy->state &&
348 switch(easy->
state) {
500 else if(
TRUE == done) {
551 (*running_handles)++;
#define GOOD_MULTI_HANDLE(x)
CURLcode Curl_pretransfer(struct SessionHandle *data)
struct Curl_one_easy easy
enum UrlState::@12 used_interface
struct Curl_one_easy * next
struct connectdata * easy_conn
struct Curl_message * next
void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
CURLcode Curl_posttransfer(struct SessionHandle *data)
curl_hash * Curl_hash_alloc(int slots, curl_hash_dtor dtor)
struct DynamicStatic change
#define CURL_MULTI_HANDLE
CURLcode Curl_connect(struct SessionHandle *data, struct connectdata **in_connect, bool *asyncp)
CURLcode Curl_is_connected(struct connectdata *conn, curl_socket_t sockfd, bool *connected)
CURLMcode curl_multi_fdset(CURLM *multi_handle, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *exc_fd_set, int *max_fd)
CURLM * curl_multi_init(void)
CURLcode Curl_do(struct connectdata **connp)
void Curl_single_fdset(struct connectdata *conn, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *exc_fd_set, int *max_fd)
struct Curl_one_easy * prev
CURLcode Curl_multi_ares_fdset(struct connectdata *conn, fd_set *read_fd_set, fd_set *write_fd_set, int *max_fdp)
CURLcode Curl_protocol_connect(struct connectdata *conn, struct Curl_dns_entry *hostaddr)
CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
CURLcode Curl_follow(struct SessionHandle *data, char *newurl)
void Curl_freednsinfo(void *freethis)
#define GOOD_EASY_HANDLE(x)
CURLcode Curl_async_resolved(struct connectdata *conn)
struct Curl_message * msg
void Curl_hash_destroy(curl_hash *h)
CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle)
CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *curl_handle)
CURLcode Curl_disconnect(struct connectdata *conn)
CURLcode Curl_readwrite(struct connectdata *conn, bool *done)
CURLMcode curl_multi_cleanup(CURLM *multi_handle)
CURLcode Curl_do_more(struct connectdata *conn)
CURLcode Curl_is_resolved(struct connectdata *conn, struct Curl_dns_entry **dns)
struct SessionHandle * easy_handle
CURLMsg * curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue)
CURLcode Curl_readwrite_init(struct connectdata *conn)
CURLcode Curl_done(struct connectdata *conn)