version 1.1.1.1, 2012/02/21 23:48:05
|
version 1.1.1.4, 2014/06/15 20:04:01
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| PHP Version 5 | |
| PHP Version 5 | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2014 The PHP Group | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 194 PHPAPI void _php_emit_fd_setsize_warning(int max_fd);
|
Line 194 PHPAPI void _php_emit_fd_setsize_warning(int max_fd);
|
/* it is safe to FD_SET too many fd's under win32; the macro will simply ignore |
/* it is safe to FD_SET too many fd's under win32; the macro will simply ignore |
* descriptors that go beyond the default FD_SETSIZE */ |
* descriptors that go beyond the default FD_SETSIZE */ |
# define PHP_SAFE_FD_SET(fd, set) FD_SET(fd, set) |
# define PHP_SAFE_FD_SET(fd, set) FD_SET(fd, set) |
|
# define PHP_SAFE_FD_CLR(fd, set) FD_CLR(fd, set) |
# define PHP_SAFE_FD_ISSET(fd, set) FD_ISSET(fd, set) |
# define PHP_SAFE_FD_ISSET(fd, set) FD_ISSET(fd, set) |
# define PHP_SAFE_MAX_FD(m, n) do { if (n + 1 >= FD_SETSIZE) { _php_emit_fd_setsize_warning(n); }} while(0) |
# define PHP_SAFE_MAX_FD(m, n) do { if (n + 1 >= FD_SETSIZE) { _php_emit_fd_setsize_warning(n); }} while(0) |
#else |
#else |
# define PHP_SAFE_FD_SET(fd, set) do { if (fd < FD_SETSIZE) FD_SET(fd, set); } while(0) |
# define PHP_SAFE_FD_SET(fd, set) do { if (fd < FD_SETSIZE) FD_SET(fd, set); } while(0) |
|
# define PHP_SAFE_FD_CLR(fd, set) do { if (fd < FD_SETSIZE) FD_CLR(fd, set); } while(0) |
# define PHP_SAFE_FD_ISSET(fd, set) ((fd < FD_SETSIZE) && FD_ISSET(fd, set)) |
# define PHP_SAFE_FD_ISSET(fd, set) ((fd < FD_SETSIZE) && FD_ISSET(fd, set)) |
# define PHP_SAFE_MAX_FD(m, n) do { if (m >= FD_SETSIZE) { _php_emit_fd_setsize_warning(m); m = FD_SETSIZE - 1; }} while(0) |
# define PHP_SAFE_MAX_FD(m, n) do { if (m >= FD_SETSIZE) { _php_emit_fd_setsize_warning(m); m = FD_SETSIZE - 1; }} while(0) |
#endif |
#endif |
Line 220 typedef struct {
|
Line 222 typedef struct {
|
#endif |
#endif |
|
|
BEGIN_EXTERN_C() |
BEGIN_EXTERN_C() |
|
PHPAPI int php_network_getaddresses(const char *host, int socktype, struct sockaddr ***sal, char **error_string TSRMLS_DC); |
|
PHPAPI void php_network_freeaddresses(struct sockaddr **sal); |
|
|
PHPAPI php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short port, |
PHPAPI php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short port, |
int socktype, int asynchronous, struct timeval *timeout, char **error_string, |
int socktype, int asynchronous, struct timeval *timeout, char **error_string, |
int *error_code, char *bindto, unsigned short bindport |
int *error_code, char *bindto, unsigned short bindport |