tor  0.4.2.1-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-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
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  size_t *buf_flushlen);
26 
27 int buf_read_from_pipe(struct buf_t *buf, int fd, size_t at_most,
28  int *reached_eof,
29  int *socket_error);
30 
31 int buf_flush_to_pipe(struct buf_t *buf, int fd, size_t sz,
32  size_t *buf_flushlen);
33 
34 #endif /* !defined(TOR_BUFFERS_NET_H) */
int buf_flush_to_socket(struct buf_t *buf, tor_socket_t s, size_t sz, size_t *buf_flushlen)
Definition: buffers_net.c:231
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:269
#define tor_socket_t
Definition: nettypes.h:36
int buf_flush_to_pipe(struct buf_t *buf, int fd, size_t sz, size_t *buf_flushlen)
Definition: buffers_net.c:257
Header for socket.c.
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:243