aboutsummaryrefslogtreecommitdiff
path: root/src/core/mainloop/connection.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-13 15:51:53 -0500
committerNick Mathewson <nickm@torproject.org>2018-11-15 11:17:22 -0500
commitce6209cee4a113c6a224f0c98244852354ccdb40 (patch)
tree9a9df206689a047e6ea733373cc91786f4f38a9f /src/core/mainloop/connection.h
parent2c15b6538123047c258987b00475fa658ca14878 (diff)
downloadtor-ce6209cee4a113c6a224f0c98244852354ccdb40.tar.gz
tor-ce6209cee4a113c6a224f0c98244852354ccdb40.zip
Add a periodic event to become dormant.
This event makes us become dormant if we have seen no activity in a long time. Note that being any kind of a server, or running an onion service, always counts as being active. Note that right now, just having an open stream that Tor did not open on its own (for a directory request) counts as "being active", so if you have an idle ssh connection, that will keep Tor from becoming dormant. Many of the features here should become configurable; I'd like feedback on which.
Diffstat (limited to 'src/core/mainloop/connection.h')
-rw-r--r--src/core/mainloop/connection.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/mainloop/connection.h b/src/core/mainloop/connection.h
index b569bb038e..9f1a23c6f2 100644
--- a/src/core/mainloop/connection.h
+++ b/src/core/mainloop/connection.h
@@ -240,6 +240,7 @@ size_t connection_get_outbuf_len(connection_t *conn);
connection_t *connection_get_by_global_id(uint64_t id);
connection_t *connection_get_by_type(int type);
+connection_t *connection_get_by_type_nonlinked(int type);
MOCK_DECL(connection_t *,connection_get_by_type_addr_port_purpose,(int type,
const tor_addr_t *addr,
uint16_t port, int purpose));