aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-05-02 23:17:08 +0000
committerNick Mathewson <nickm@torproject.org>2005-05-02 23:17:08 +0000
commita312ce1d3b77522b08e91e1524c91e9dfb05f90a (patch)
tree2d5278d8d300931542417c7272c8eec18bcad4bc /src/or/or.h
parent9c683c7613ba5d15477e7f21d74cc465e82ac5bd (diff)
downloadtor-a312ce1d3b77522b08e91e1524c91e9dfb05f90a.tar
tor-a312ce1d3b77522b08e91e1524c91e9dfb05f90a.tar.gz
Change buffer shrinking strategy: only try to shrink once every 3 minutes. Do not try to read over buffer size unless buffer is nearly empty.
svn:r4165
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 31922901c..a96e1eea8 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1123,9 +1123,11 @@ buf_t *buf_new(void);
buf_t *buf_new_with_capacity(size_t size);
void buf_free(buf_t *buf);
void buf_clear(buf_t *buf);
+void buf_shrink(buf_t *buf);
size_t buf_datalen(const buf_t *buf);
size_t buf_capacity(const buf_t *buf);
+unsigned int buf_n_times_resized(const buf_t *buf);
const char *_buf_peek_raw_buffer(const buf_t *buf);
int read_to_buf(int s, size_t at_most, buf_t *buf, int *reached_eof);