Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi events rework #16308

Closed
wants to merge 1 commit into from
Closed

multi events rework #16308

wants to merge 1 commit into from

Conversation

icing
Copy link
Contributor

@icing icing commented Feb 12, 2025

Rework the event based handling of transfers and connections into a single source file with clearer dependencies.

  • add multi_ev.c and multi_ev.h
  • add docs/internal/MULTI-EV.md to explain the overall workings
  • only do event handling book keeping when the socket callback is set
  • add handling for "connection only" event tracking, when internal easy handles are used that are not really tied to a connection. Used in connection pool.
  • remove transfer member "last_poll" and connections "shutdown_poll" and keep all that internal to multi_ev.c
  • add CURL_TRC_M() for tracing of "multi" related things, including event handling and connection pool operations. Add new trace feature "multi" for trace config. multi traces will show exactly what is going on in regard to event handling.
  • multi: trace transfers "mstate" in every CURL_TRC_M() call
  • make internal trace buffer 2048 bytes and end the silliness with +n here -m there. Adjust test 1652 expectations of resulting length and input edge cases.
  • add trace feature "lib-ids" to perfix libcurl traces with transfer and connection ids. Useful for debugging libcurl applications.

@icing icing added the feature-window A merge of this requires an open feature window label Feb 12, 2025
@icing icing force-pushed the multi-ev-rework branch 3 times, most recently from a720b7a to da8c1e0 Compare February 17, 2025 12:27
@curl curl deleted a comment from testclutch Feb 20, 2025
@icing icing mentioned this pull request Feb 20, 2025
@icing icing force-pushed the multi-ev-rework branch 2 times, most recently from b25d40b to 7ad1957 Compare February 22, 2025 11:13
Rework the event based handling of transfers and connections to
be "localized" into a single source file with clearer dependencies.

- add multi_ev.c and multi_ev.h
- add docs/internal/MULTI-EV.md to explain the overall workings
- only do event handling book keeping when the socket callback
  is set
- add handling for "connection only" event tracking, when internal
  easy handles are used that are not really tied to a connection.
  Used in connection pool.
- remove transfer member "last_poll" and connections "shutdown_poll"
  and keep all that internal to multi_ev.c
- add CURL_TRC_M() for tracing of "multi" related things, including
  event handling and connection pool operations. Add new trace
  feature "multi" for trace config.
  multi traces will show exactly what is going on in regard to
  event handling.
- multi: trace transfers "mstate" in every CURL_TRC_M() call
- make internal trace buffer 2048 bytes and end the silliness
  with +n here -m there. Adjust test 1652 expectations of resulting
  length and input edge cases.
- add trace feature "lib-ids" to perfix libcurl traces with transfer
  and connection ids. Useful for debugging libcurl applications.
@icing icing requested a review from bagder February 22, 2025 12:26
@bagder bagder closed this in cfc657a Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmdline tool feature-window A merge of this requires an open feature window libcurl API tests
Development

Successfully merging this pull request may close these issues.

2 participants