buffers_net.h 756 B

123456789101112131415161718192021222324252627
  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-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. /**
  7. * \file buffers_net.h
  8. *
  9. * \brief Header file for buffers_net.c.
  10. **/
  11. #ifndef TOR_BUFFERS_NET_H
  12. #define TOR_BUFFERS_NET_H
  13. #include <stddef.h>
  14. #include "lib/net/socket.h"
  15. struct buf_t;
  16. int buf_read_from_socket(struct buf_t *buf, tor_socket_t s, size_t at_most,
  17. int *reached_eof,
  18. int *socket_error);
  19. int buf_flush_to_socket(struct buf_t *buf, tor_socket_t s, size_t sz,
  20. size_t *buf_flushlen);
  21. #endif /* !defined(TOR_BUFFERS_H) */