From a64eceef5979d94bbe7e37f5d3f3cd1cd6957c43 Mon Sep 17 00:00:00 2001 From: Jason Greene Date: Mon, 22 Jul 2002 18:46:26 +0000 Subject: Switch streams socket abstraction to use a timeval structure instead of an integer to allow subsecond timeouts. This supports the previous behavior of fsockopen() Fixes bug #16261 --- main/php_network.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/php_network.h') diff --git a/main/php_network.h b/main/php_network.h index 404dc619de..70e7ad5a9c 100644 --- a/main/php_network.h +++ b/main/php_network.h @@ -91,7 +91,7 @@ typedef struct { #endif -int php_hostconnect(const char *host, unsigned short port, int socktype, int timeout); +int php_hostconnect(const char *host, unsigned short port, int socktype, struct timeval *timeout); PHPAPI int php_connect_nonb(int sockfd, const struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout); #ifdef PHP_WIN32 @@ -128,7 +128,7 @@ extern php_stream_ops php_stream_socket_ops; PHPAPI php_stream *_php_stream_sock_open_from_socket(int socket, int persistent STREAMS_DC TSRMLS_DC ); /* open a connection to a host using php_hostconnect and return a stream */ PHPAPI php_stream *_php_stream_sock_open_host(const char *host, unsigned short port, - int socktype, int timeout, int persistent STREAMS_DC TSRMLS_DC); + int socktype, struct timeval *timeout, int persistent STREAMS_DC TSRMLS_DC); PHPAPI php_stream *_php_stream_sock_open_unix(const char *path, int pathlen, int persistent, struct timeval *timeout STREAMS_DC TSRMLS_DC); -- cgit v1.2.1