tcp_read.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2010 iptelorg GmbH
  5. *
  6. * Permission to use, copy, modify, and distribute this software for any
  7. * purpose with or without fee is hereby granted, provided that the above
  8. * copyright notice and this permission notice appear in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  11. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  12. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  13. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  14. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  15. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  16. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /** tcp internal read functions.
  19. * @file tcp_read.h
  20. * @ingroup: core
  21. * Module: @ref core
  22. */
  23. /*
  24. * History:
  25. * --------
  26. * 2010-05-18 initial version (andrei)
  27. */
  28. #ifndef __tcp_read_h
  29. #define __tcp_read_h
  30. #include "tcp_conn.h"
  31. #define RD_CONN_SHORT_READ 1
  32. #define RD_CONN_EOF 2
  33. #define RD_CONN_REPEAT_READ 4 /* read should be repeated (more data)
  34. (used so far only by tls) */
  35. #define RD_CONN_FORCE_EOF 65536
  36. int tcp_read_data(int fd, struct tcp_connection *c,
  37. char* buf, int b_size, int* flags);
  38. #endif /*__tcp_read_h*/
  39. /* vi: set ts=4 sw=4 tw=79:ai:cindent: */