37 static const char *
urls[] = {
38 "http://www.microsoft.com",
39 "http://www.opensource.org",
40 "http://www.google.com",
41 "http://www.yahoo.com",
43 "http://www.mysql.com",
44 "http://www.oracle.com",
45 "http://www.ripe.net",
46 "http://www.iana.org",
47 "http://www.amazon.com",
48 "http://www.netcraft.com",
49 "http://www.heise.de",
52 "http://www.cnet.com",
53 "http://www.news.com",
55 "http://www.wikipedia.org",
56 "http://www.dell.com",
58 "http://www.cert.org",
60 "http://www.nist.gov",
61 "http://www.ebay.com",
62 "http://www.playstation.com",
63 "http://www.uefa.com",
64 "http://www.ieee.org",
65 "http://www.apple.com",
66 "http://www.symantec.com",
67 "http://www.zdnet.com",
68 "http://www.fujitsu.com",
69 "http://www.supermicro.com",
70 "http://www.hotmail.com",
71 "http://www.ecma.com",
72 "http://www.bbc.co.uk",
73 "http://news.google.com",
74 "http://www.foxnews.com",
76 "http://www.wired.com",
78 "http://www.usatoday.com",
81 "http://slashdot.org",
82 "http://www.bloglines.com",
83 "http://www.techweb.com",
84 "http://www.newslink.org",
89 #define CNT sizeof(urls)/sizeof(char *) 91 static size_t cb(
char *d,
size_t n,
size_t l,
void *
p)
130 for(C = 0; C <
MAX; ++C) {
143 fprintf(stderr,
"E: curl_multi_fdset\n");
148 fprintf(stderr,
"E: curl_multi_timeout\n");
158 sleep((
unsigned int)L / 1000);
165 if(0 > select(M + 1, &R, &W, &E, &T)) {
166 fprintf(stderr,
"E: select(%i,,,,%li): %i: %s\n",
167 M + 1, L, errno, strerror(errno));
178 fprintf(stderr,
"R: %d - %s <%s>\n",
184 fprintf(stderr,
"E: CURLMsg (%d)\n", msg->
msg);
CURL_EXTERN 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)
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *curl_handle)
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, long *milliseconds)
static void init(CURLM *cm, int i)
#define curl_easy_setopt(handle, option, value)
static CURL * eh[NUM_HANDLES]
CURL_EXTERN CURLM * curl_multi_init(void)
#define curl_multi_setopt(handle, opt, param)
#define curl_easy_getinfo(handle, info, arg)
CURL_EXTERN CURL * curl_easy_init(void)
CURL_EXTERN void curl_easy_cleanup(CURL *curl)
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *curl_handle)
CURL_EXTERN CURLcode curl_global_init(long flags)
curl_global_init() globally initializes curl given a bitwise set of the different features of what to...
static const char * urls[]
static size_t cb(char *d, size_t n, size_t l, void *p)
CURL_EXTERN CURLMsg * curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue)
CURL_EXTERN void curl_global_cleanup(void)
curl_global_cleanup() globally cleanups curl, uses the value of "init_flags" to determine what needs ...
CURL_EXTERN const char * curl_easy_strerror(CURLcode)
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle)