summaryrefslogtreecommitdiff
path: root/ext/sockets/php_sockets.h
diff options
context:
space:
mode:
authorDaniel Beulshausen <dbeu@php.net>2001-07-25 22:03:55 +0000
committerDaniel Beulshausen <dbeu@php.net>2001-07-25 22:03:55 +0000
commit69a4760b48a5e17c4cc2d2b8ac9c0aec968d3a48 (patch)
tree1c6634e0abf97c205252f5e538f066ca19e72e9b /ext/sockets/php_sockets.h
parent082165f1981043c827694e1399e4025d9628f1d1 (diff)
downloadphp-git-69a4760b48a5e17c4cc2d2b8ac9c0aec968d3a48.tar.gz
fix recently discovered api flaws
- nuke first parameter to socket_select (detemine it ourself) - swap parameters for socket_fd_set, socket_fd_clear & socket_fd_isset - allow to pass an array of sockets to socket_fd_set + socket_fd_clear
Diffstat (limited to 'ext/sockets/php_sockets.h')
-rw-r--r--ext/sockets/php_sockets.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index 03f435e9b3..db0f55f9fe 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -78,21 +78,30 @@ PHP_FUNCTION(socket_setopt);
PHP_FUNCTION(socket_shutdown);
typedef struct php_iovec {
- struct iovec *iov_array;
- unsigned int count;
+ struct iovec *iov_array;
+ unsigned int count;
} php_iovec_t;
-typedef struct {
-#ifdef PHP_WIN32
- SOCKET socket;
-#else
- int socket;
+#ifndef PHP_WIN32
+typedef int SOCKET;
#endif
- int type;
+
+typedef struct {
+ SOCKET socket;
+ int type;
} php_socket;
typedef struct {
- zend_bool use_system_read;
+ fd_set set;
+ SOCKET max_fd;
+} php_fd_set;
+
+typedef struct {
+ unsigned char info[256];
+} php_sockaddr_storage;
+
+typedef struct {
+ zend_bool use_system_read;
} php_sockets_globals;