Bump copyright date to 2019
[tor.git] / src / lib / net / buffers_net.h
bloba3a90172a11df749bfef836b5daca2f4f1d1ae38
1 /* Copyright (c) 2001 Matej Pfajfar.
2 * Copyright (c) 2001-2004, Roger Dingledine.
3 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4 * Copyright (c) 2007-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
7 /**
8 * \file buffers_net.h
10 * \brief Header file for buffers_net.c.
11 **/
13 #ifndef TOR_BUFFERS_NET_H
14 #define TOR_BUFFERS_NET_H
16 #include <stddef.h>
17 #include "lib/net/socket.h"
19 struct buf_t;
20 int buf_read_from_socket(struct buf_t *buf, tor_socket_t s, size_t at_most,
21 int *reached_eof,
22 int *socket_error);
24 int buf_flush_to_socket(struct buf_t *buf, tor_socket_t s, size_t sz,
25 size_t *buf_flushlen);
27 int buf_read_from_pipe(struct buf_t *buf, int fd, size_t at_most,
28 int *reached_eof,
29 int *socket_error);
31 int buf_flush_to_pipe(struct buf_t *buf, int fd, size_t sz,
32 size_t *buf_flushlen);
34 #endif /* !defined(TOR_BUFFERS_H) */