bind9/tests/isc
Ondřej Surý fffd444440
Cleanup the asychronous code in the stream implementations
After the loopmgr work has been merged, we can now cleanup the TCP and
TLS protocols a little bit, because there are stronger guarantees that
the sockets will be kept on the respective loops/threads.  We only need
asynchronous call for listening sockets (start, stop) and reading from
the TCP (because the isc_nm_read() might be called from read callback
again.

This commit does the following changes (they are intertwined together):

1. Cleanup most of the asynchronous events in the TCP code, and add
   comments for the events that needs to be kept asynchronous.

2. Remove isc_nm_resumeread() from the netmgr API, and replace
   isc_nm_resumeread() calls with existing isc_nm_read() calls.

3. Remove isc_nm_pauseread() from the netmgr API, and replace
   isc_nm_pauseread() calls with a new isc_nm_read_stop() call.

4. Disable the isc_nm_cancelread() for the streaming protocols, only the
   datagram-like protocols can use isc_nm_cancelread().

5. Add isc_nmhandle_close() that can be used to shutdown the socket
  earlier than after the last detach.  Formerly, the socket would be
  closed only after all reading and sending would be finished and the
  last reference would be detached.  The new isc_nmhandle_close() can
  be used to close the underlying socket earlier, so all the other
  asynchronous calls would call their respective callbacks immediately.

Co-authored-by: Ondřej Surý <ondrej@isc.org>
Co-authored-by: Artem Boldariev <artem@isc.org>
2022-09-22 14:51:15 +02:00
..
testdata/file Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
aes_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
ascii_test.c Use the semantic patch to do the unsigned -> unsigned int change 2022-09-19 15:56:02 +02:00
async_test.c New event loop handling API 2022-08-25 12:24:29 +02:00
buffer_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
counter_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
crc64_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
doh_test.c Use the semantic patch to do the unsigned -> unsigned int change 2022-09-19 15:56:02 +02:00
errno_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
file_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
hash_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
heap_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
hmac_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
ht_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
job_test.c New event loop handling API 2022-08-25 12:24:29 +02:00
lex_test.c Update netmgr, tasks, and applications to use isc_loopmgr 2022-08-26 09:09:24 +02:00
loop_test.c New event loop handling API 2022-08-25 12:24:29 +02:00
Makefile.am Tests and benchmark for isc_ascii 2022-09-12 12:23:39 +01:00
md_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
mem_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
netaddr_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
netmgr_common.c Cleanup the asychronous code in the stream implementations 2022-09-22 14:51:15 +02:00
netmgr_common.h Cleanup the asychronous code in the stream implementations 2022-09-22 14:51:15 +02:00
parse_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
quota_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
radix_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
random_test.c Move random number re-seeding out of the hot path 2022-09-19 16:27:12 +02:00
regex_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
result_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
safe_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
siphash_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
sockaddr_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
stats_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
symtab_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
task_test.c Update netmgr, tasks, and applications to use isc_loopmgr 2022-08-26 09:09:24 +02:00
tcp_test.c Cleanup the asychronous code in the stream implementations 2022-09-22 14:51:15 +02:00
tcpdns_test.c Split netmgr_test into separate per-transport unit tests 2022-08-26 09:09:25 +02:00
time_test.c Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
timer_test.c Add more unit tests for isc_timer 2022-09-22 09:46:25 +02:00
tls_test.c Cleanup the asychronous code in the stream implementations 2022-09-22 14:51:15 +02:00
tlsdns_test.c Split netmgr_test into separate per-transport unit tests 2022-08-26 09:09:25 +02:00
udp_test.c Improve the udp_shutdown_read and udp_cancel_read tests 2022-09-19 14:16:07 +02:00
uv_wrap.h Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
work_test.c New event loop handling API 2022-08-25 12:24:29 +02:00