2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

replace per-protocol keepalive functions with a common one

this commit removes isc__nm_tcpdns_keepalive() and
isc__nm_tlsdns_keepalive(); keepalive for these protocols and
for TCP will now be set directly from isc_nmhandle_keepalive().

protocols that have an underlying TCP socket (i.e., TLS stream
and HTTP), now have protocol-specific routines, called by
isc_nmhandle_keeaplive(), to set the keepalive value on the
underlying socket.
This commit is contained in:
Evan Hunt
2021-07-14 21:12:37 -07:00
parent 7867b8b57d
commit fc6f751fbe
6 changed files with 67 additions and 49 deletions

View File

@@ -1517,15 +1517,6 @@ isc__nm_tcpdns_cancelread(isc_nmhandle_t *handle);
* Stop reading on a connected TCPDNS handle.
*/
void
isc__nm_tcpdns_keepalive(isc_nmhandle_t *handle, bool value);
/*%<
* Enable/disable keepalive on this connection by setting it to 'value'.
*
* When keepalive is active, we switch to using the keepalive timeout
* to determine when to close a connection, rather than the idle timeout.
*/
void
isc__nm_tlsdns_send(isc_nmhandle_t *handle, isc_region_t *region,
isc_nm_cb_t cb, void *cbarg);
@@ -1564,15 +1555,6 @@ isc__nm_tlsdns_cancelread(isc_nmhandle_t *handle);
* Stop reading on a connected TLSDNS handle.
*/
void
isc__nm_tlsdns_keepalive(isc_nmhandle_t *handle, bool value);
/*%<
* Enable/disable keepalive on this connection by setting it to 'value'.
*
* When keepalive is active, we switch to using the keepalive timeout
* to determine when to close a connection, rather than the idle timeout.
*/
void
isc__nm_async_tlsdnscycle(isc__networker_t *worker, isc__netievent_t *ev0);
void
@@ -1647,6 +1629,12 @@ isc__nm_tls_cleartimeout(isc_nmhandle_t *handle);
* around.
*/
void
isc__nmhandle_tls_keepalive(isc_nmhandle_t *handle, bool value);
/*%<
* Set the keepalive value on the underlying TCP handle.
*/
void
isc__nm_http_stoplistening(isc_nmsocket_t *sock);
@@ -1660,6 +1648,12 @@ isc__nm_http_cleartimeout(isc_nmhandle_t *handle);
* around.
*/
void
isc__nmhandle_http_keepalive(isc_nmhandle_t *handle, bool value);
/*%<
* Set the keepalive value on the underlying session handle
*/
void
isc__nm_http_initsocket(isc_nmsocket_t *sock);