mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
TCP: add manual read timer control mode
This commit adds a manual read timer control mode to the TCP code (adding isc__nmhandle_set_manual_timer() as the interface to it). Manual read timer control mode suppresses read timer restarting the read timer when receiving any amount of data. This way the read timer can be controlled manually using: * isc__nmsocket_timer_start(); * isc__nmsocket_timer_stop(); * isc__nmsocket_timer_restart(). The change is required to make it possible to implement more sophisticated read timer control policies in DNS transports, built on top of TCP.
This commit is contained in:
@@ -1062,6 +1062,7 @@ struct isc_nmsocket {
|
||||
atomic_int_fast32_t active_child_connections;
|
||||
|
||||
bool barrier_initialised;
|
||||
bool manual_read_timer;
|
||||
#ifdef NETMGR_TRACE
|
||||
void *backtrace[TRACE_SIZE];
|
||||
int backtrace_size;
|
||||
@@ -1354,6 +1355,9 @@ isc__nm_tcp_settimeout(isc_nmhandle_t *handle, uint32_t timeout);
|
||||
* Set the read timeout for the TCP socket associated with 'handle'.
|
||||
*/
|
||||
|
||||
void
|
||||
isc__nmhandle_tcp_set_manual_timer(isc_nmhandle_t *handle, const bool manual);
|
||||
|
||||
void
|
||||
isc__nm_async_tcplisten(isc__networker_t *worker, isc__netievent_t *ev0);
|
||||
void
|
||||
@@ -2008,3 +2012,10 @@ isc__nmsocket_log(const isc_nmsocket_t *sock, int level, const char *fmt, ...)
|
||||
void
|
||||
isc__nmhandle_log(const isc_nmhandle_t *handle, int level, const char *fmt, ...)
|
||||
ISC_FORMAT_PRINTF(3, 4);
|
||||
|
||||
void
|
||||
isc__nmhandle_set_manual_timer(isc_nmhandle_t *handle, const bool manual);
|
||||
/*
|
||||
* Set manual read timer control mode - so that it will not get reset
|
||||
* automatically on read nor get started when read is initiated.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user