From 488e2b00bf881b97bcc8e4bbe304845ff1d79a03 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 17 Apr 2018 11:39:16 -0400 Subject: Refactor the "block the connection on bandwidth" logic Right now, this patch just introduces and exposes some new functions. Later, these functions will get a little more complexity. --- src/or/connection.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/or/connection.h') diff --git a/src/or/connection.h b/src/or/connection.h index cfe31c3727..83e2bd5438 100644 --- a/src/or/connection.h +++ b/src/or/connection.h @@ -125,6 +125,10 @@ void connection_bucket_init(void); void connection_bucket_adjust(const or_options_t *options); void connection_bucket_refill(time_t now, uint32_t now_ts); +void connection_read_bw_exhausted(connection_t *conn, bool is_global_bw); +void connection_write_bw_exhausted(connection_t *conn, bool is_global_bw); +void connection_consider_empty_read_buckets(connection_t *conn); +void connection_consider_empty_write_buckets(connection_t *conn); int connection_handle_read(connection_t *conn); -- cgit v1.2.3-54-g00ecf