Commit a58b50f
transfer: Curl_sendrecv() and event related improvements
- Renames Curl_readwrite() to Curl_sendrecv() to reflect that it
is mainly about talking to the server, not reads or writes to the
client. Add a `nowp` parameter since the single caller already
has this.
- Curl_sendrecv() now runs all possible operations whenever it is
called and either it had been polling sockets or the 'select_bits'
are set.
POLL_IN/POLL_OUT are not always directly related to send/recv
operations. Filters like HTTP/2, QUIC or TLS may monitor reverse
directions. If a transfer does not want to send (KEEP_SEND), it
will not do so, as before. Same for receives.
- Curl_update_timer() now checks the absolute timestamp of an expiry
and the last/new timeout to determine if the application needs
to stop/start/restart its timer. This fixes edge cases where
updates did not happen as they should have.
- improved --test-event curl_easy_perform() simulation to handle
situations where no sockets are registered but a timeout is
in place.
- fixed bug in events_socket() that complained about removing
a socket that was unknown, when indeed it had removed the socket
just before, only it was the last in the list
- fixed conncache's internal handle to carry the multi instance
(where the cache has one) so that operations on the closure handle
trigger event callbacks correctly.
- fixed conncache to not POLL_REMOVE a socket twice when a conneciton
was closed.
Closes #145611 parent 432f2fd commit a58b50f
File tree
12 files changed
+318
-283
lines changed- lib
- tests
12 files changed
+318
-283
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
407 | 410 | | |
408 | 411 | | |
409 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| |||
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
| |||
611 | 621 | | |
612 | 622 | | |
613 | 623 | | |
614 | | - | |
| 624 | + | |
| 625 | + | |
615 | 626 | | |
616 | 627 | | |
617 | 628 | | |
| |||
980 | 991 | | |
981 | 992 | | |
982 | 993 | | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | 994 | | |
992 | 995 | | |
993 | 996 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
394 | 396 | | |
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
399 | | - | |
400 | 401 | | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
413 | 410 | | |
414 | 411 | | |
415 | 412 | | |
| |||
463 | 460 | | |
464 | 461 | | |
465 | 462 | | |
| 463 | + | |
466 | 464 | | |
467 | 465 | | |
468 | 466 | | |
| |||
472 | 470 | | |
473 | 471 | | |
474 | 472 | | |
475 | | - | |
| 473 | + | |
476 | 474 | | |
477 | 475 | | |
478 | 476 | | |
| |||
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
484 | | - | |
485 | 482 | | |
486 | 483 | | |
487 | 484 | | |
| |||
499 | 496 | | |
500 | 497 | | |
501 | 498 | | |
502 | | - | |
| 499 | + | |
| 500 | + | |
503 | 501 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
508 | 506 | | |
509 | 507 | | |
510 | 508 | | |
| |||
565 | 563 | | |
566 | 564 | | |
567 | 565 | | |
568 | | - | |
569 | 566 | | |
570 | 567 | | |
571 | 568 | | |
572 | 569 | | |
573 | 570 | | |
574 | 571 | | |
575 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
576 | 575 | | |
577 | 576 | | |
578 | 577 | | |
579 | 578 | | |
580 | 579 | | |
581 | 580 | | |
582 | 581 | | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
589 | 603 | | |
590 | 604 | | |
591 | 605 | | |
| |||
618 | 632 | | |
619 | 633 | | |
620 | 634 | | |
621 | | - | |
| 635 | + | |
| 636 | + | |
622 | 637 | | |
623 | 638 | | |
624 | 639 | | |
625 | | - | |
| 640 | + | |
626 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
627 | 646 | | |
628 | 647 | | |
629 | 648 | | |
| |||
656 | 675 | | |
657 | 676 | | |
658 | 677 | | |
659 | | - | |
| 678 | + | |
660 | 679 | | |
661 | 680 | | |
662 | 681 | | |
| |||
1121 | 1140 | | |
1122 | 1141 | | |
1123 | 1142 | | |
1124 | | - | |
| 1143 | + | |
1125 | 1144 | | |
1126 | 1145 | | |
1127 | 1146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4441 | 4441 | | |
4442 | 4442 | | |
4443 | 4443 | | |
4444 | | - | |
| 4444 | + | |
| 4445 | + | |
4445 | 4446 | | |
4446 | 4447 | | |
4447 | 4448 | | |
| |||
0 commit comments