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-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
10 * \brief Header file for buffers_net.c.
13 #ifndef TOR_BUFFERS_NET_H
14 #define TOR_BUFFERS_NET_H
17 #include "lib/net/socket.h"
20 int buf_read_from_socket(struct buf_t
*buf
, tor_socket_t s
, size_t at_most
,
24 int buf_flush_to_socket(struct buf_t
*buf
, tor_socket_t s
, size_t sz
);
26 int buf_read_from_pipe(struct buf_t
*buf
, int fd
, size_t at_most
,
30 int buf_flush_to_pipe(struct buf_t
*buf
, int fd
, size_t sz
);
32 #endif /* !defined(TOR_BUFFERS_NET_H) */