1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 7 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 1997-2017 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 19 #ifndef PHPDBG_IO_H 20 #define PHPDBG_IO_H 21 22 #include "phpdbg.h" 23 24 /* Older versions of glibc <= 2.3.0 and <= OS X 10.5 do not have this constant defined */ 25 #ifndef AI_NUMERICSERV 26 #define AI_NUMERICSERV 0 27 #endif 28 29 PHPDBG_API int phpdbg_consume_stdin_line(char *buf); 30 31 PHPDBG_API int phpdbg_consume_bytes(int sock, char *ptr, int len, int tmo); 32 PHPDBG_API int phpdbg_send_bytes(int sock, const char *ptr, int len); 33 PHPDBG_API int phpdbg_mixed_read(int sock, char *ptr, int len, int tmo); 34 PHPDBG_API int phpdbg_mixed_write(int sock, const char *ptr, int len); 35 36 PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short port, struct addrinfo *res); 37 PHPDBG_API int phpdbg_open_socket(const char *interface, unsigned short port); 38 PHPDBG_API void phpdbg_close_socket(int sock); 39 40 #endif /* PHPDBG_IO_H */ 41 42