summaryrefslogtreecommitdiff
path: root/main/php_network.h
diff options
context:
space:
mode:
authorJason Greene <jason@php.net>2002-07-22 18:46:26 +0000
committerJason Greene <jason@php.net>2002-07-22 18:46:26 +0000
commita64eceef5979d94bbe7e37f5d3f3cd1cd6957c43 (patch)
tree35a5773b6575f386e3ff1208235174635fe15de9 /main/php_network.h
parent469266e4a242e4893d8663fe5b9e78c0a1ddf50f (diff)
downloadphp-git-a64eceef5979d94bbe7e37f5d3f3cd1cd6957c43.tar.gz
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
Diffstat (limited to 'main/php_network.h')
-rw-r--r--main/php_network.h4
1 files changed, 2 insertions, 2 deletions
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);