aboutsummaryrefslogtreecommitdiff
path: root/src/lib/net/buffers_net.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-28 16:25:06 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-28 16:28:08 -0400
commitd8b34e0886c9fd08fb51e0de4fadca7da82056ff (patch)
tree5b2a8cea0d0a683f7ab1e71a158c28021f9dfb99 /src/lib/net/buffers_net.h
parentbe40ad51b68fa87bafb88e55db7856d373274a4d (diff)
downloadtor-d8b34e0886c9fd08fb51e0de4fadca7da82056ff.tar.gz
tor-d8b34e0886c9fd08fb51e0de4fadca7da82056ff.zip
Move buffers into container
Split the network-only and compression-only parts of buffers into the appropriate modules.
Diffstat (limited to 'src/lib/net/buffers_net.h')
-rw-r--r--src/lib/net/buffers_net.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/net/buffers_net.h b/src/lib/net/buffers_net.h
new file mode 100644
index 0000000000..d03b61376e
--- /dev/null
+++ b/src/lib/net/buffers_net.h
@@ -0,0 +1,26 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file buffers.h
+ * \brief Header file for buffers.c.
+ **/
+
+#ifndef TOR_BUFFERS_NET_H
+#define TOR_BUFFERS_NET_H
+
+#include <stddef.h>
+#include "lib/net/socket.h"
+
+struct buf_t;
+int buf_read_from_socket(struct buf_t *buf, tor_socket_t s, size_t at_most,
+ int *reached_eof,
+ int *socket_error);
+
+int buf_flush_to_socket(struct buf_t *buf, tor_socket_t s, size_t sz,
+ size_t *buf_flushlen);
+
+#endif /* !defined(TOR_BUFFERS_H) */