diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-17 11:39:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-17 11:39:16 -0400 |
commit | 488e2b00bf881b97bcc8e4bbe304845ff1d79a03 (patch) | |
tree | ada75584417994adec28a046b3cdf5a73ecbc761 /src/or/connection.h | |
parent | 2bf6f1cd39c102749ee518664036c90ab1dbfc9c (diff) | |
download | tor-488e2b00bf881b97bcc8e4bbe304845ff1d79a03.tar.gz tor-488e2b00bf881b97bcc8e4bbe304845ff1d79a03.zip |
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.
Diffstat (limited to 'src/or/connection.h')
-rw-r--r-- | src/or/connection.h | 4 |
1 files changed, 4 insertions, 0 deletions
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); |