phpdbg_io.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Anatol Belski <ab@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef PHPDBG_IO_H
  19. #define PHPDBG_IO_H
  20. #include "phpdbg.h"
  21. /* Older versions of glibc <= 2.3.0 and <= OS X 10.5 do not have this constant defined */
  22. #ifndef AI_NUMERICSERV
  23. #define AI_NUMERICSERV 0
  24. #endif
  25. PHPDBG_API int phpdbg_consume_stdin_line(char *buf);
  26. PHPDBG_API int phpdbg_consume_bytes(int sock, char *ptr, int len, int tmo);
  27. PHPDBG_API int phpdbg_send_bytes(int sock, const char *ptr, int len);
  28. PHPDBG_API int phpdbg_mixed_read(int sock, char *ptr, int len, int tmo);
  29. PHPDBG_API int phpdbg_mixed_write(int sock, const char *ptr, int len);
  30. PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short port, struct addrinfo *res);
  31. PHPDBG_API int phpdbg_open_socket(const char *interface, unsigned short port);
  32. PHPDBG_API void phpdbg_close_socket(int sock);
  33. #endif /* PHPDBG_IO_H */