mirror of
https://github.com/curl/curl.git
synced 2026-08-25 03:03:31 +03:00
curl_easy_perform_ev: debug/test function
This function is meant to work *exactly* as curl_easy_perform() but will use the event-based libcurl API internally instead of curl_multi_perform(). To avoid relying on an actual event-based library and to not use non-portable functions (like epoll or similar), there's a rather inefficient emulation layer implemented on top of Curl_poll() instead. There's currently some convenience logging done in curl_easy_perform_ev which helps when tracking down problems. They may be suitable to remove or change once things seem to be fine enough. curl has a new --test-event option when built with debug enabled that then uses curl_easy_perform_ev() instead of curl_easy_perform(). If built without debug, using --test-event will only output a warning message. NOTE: curl_easy_perform_ev() is not part if the public API on purpose. It is only present in debug builds of libcurl and MUST NOT be considered stable even then. Use it for libcurl-testing purposes only. runtests.pl now features an -e command line option that makes it use --test-event for all curl command line tests. The man page is updated.
This commit is contained in:
parent
062e5bfd9c
commit
6cf8413e31
7 changed files with 414 additions and 66 deletions
|
|
@ -174,6 +174,7 @@ static const struct LongShort aliases[]= {
|
|||
{"$I", "post303", FALSE},
|
||||
{"$J", "metalink", FALSE},
|
||||
{"$K", "sasl-ir", FALSE},
|
||||
{"$L", "test-event", FALSE},
|
||||
{"0", "http1.0", FALSE},
|
||||
{"1", "tlsv1", FALSE},
|
||||
{"2", "sslv2", FALSE},
|
||||
|
|
@ -961,6 +962,13 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||
case 'K': /* --sasl-ir */
|
||||
config->sasl_ir = toggle;
|
||||
break;
|
||||
case 'L': /* --test-event */
|
||||
#ifdef CURLDEBUG
|
||||
config->test_event_based = toggle;
|
||||
#else
|
||||
warnf(config, "--test-event is ignored unless a debug build!\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case '#': /* --progress-bar */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue