Tor  0.4.7.0-alpha-dev
buffers_net.h
Go to the documentation of this file.
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 */
6 
7 /**
8  * \file buffers_net.h
9  *
10  * \brief Header file for buffers_net.c.
11  **/
12 
13 #ifndef TOR_BUFFERS_NET_H
14 #define TOR_BUFFERS_NET_H
15 
16 #include <stddef.h>
17 #include "lib/net/socket.h"
18 
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);
23 
24 int buf_flush_to_socket(struct buf_t *buf, tor_socket_t s, size_t sz);
25 
26 int buf_read_from_pipe(struct buf_t *buf, int fd, size_t at_most,
27  int *reached_eof,
28  int *socket_error);
29 
30 int buf_flush_to_pipe(struct buf_t *buf, int fd, size_t sz);
31 
32 #endif /* !defined(TOR_BUFFERS_NET_H) */
int buf_flush_to_socket(struct buf_t *buf, tor_socket_t s, size_t sz)
Definition: buffers_net.c:224
int buf_read_from_pipe(struct buf_t *buf, int fd, size_t at_most, int *reached_eof, int *socket_error)
Definition: buffers_net.c:260
int buf_read_from_socket(struct buf_t *buf, tor_socket_t s, size_t at_most, int *reached_eof, int *socket_error)
Definition: buffers_net.c:235
int buf_flush_to_pipe(struct buf_t *buf, int fd, size_t sz)
Definition: buffers_net.c:249
#define tor_socket_t
Definition: nettypes.h:36
Header for socket.c.