summaryrefslogtreecommitdiff
path: root/ext/sockets/php_sockets.h
diff options
context:
space:
mode:
authorDaniel Beulshausen <dbeu@php.net>2001-05-17 17:02:37 +0000
committerDaniel Beulshausen <dbeu@php.net>2001-05-17 17:02:37 +0000
commit9820c2a5af9d5a91da02f13a0f704ec4ada1ed15 (patch)
treeea859777a486b8f8cd02b6f094b027435fff23de /ext/sockets/php_sockets.h
parent5b12d6077e967ba2b3a215066ee9fd4c951f9517 (diff)
downloadphp-git-9820c2a5af9d5a91da02f13a0f704ec4ada1ed15.tar.gz
update sockets to work with winsock as well
Diffstat (limited to 'ext/sockets/php_sockets.h')
-rw-r--r--ext/sockets/php_sockets.h95
1 files changed, 52 insertions, 43 deletions
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index 66055b8ee0..422451793d 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -13,6 +13,9 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Chris Vandomelen <chrisv@b0rked.dhs.org> |
+ | Sterling Hughes <sterling@php.net> |
+ | |
+ | WinSock: Daniel Beulshausen <daniel@php4win.de> |
+----------------------------------------------------------------------+
*/
@@ -35,44 +38,44 @@ extern zend_module_entry sockets_module_entry;
PHP_MINIT_FUNCTION(sockets);
PHP_MINFO_FUNCTION(sockets);
-PHP_FUNCTION(fd_alloc);
-PHP_FUNCTION(fd_dealloc);
-PHP_FUNCTION(fd_set);
-PHP_FUNCTION(fd_isset);
-PHP_FUNCTION(fd_clear);
-PHP_FUNCTION(fd_zero);
-PHP_FUNCTION(select);
-PHP_FUNCTION(open_listen_sock);
-PHP_FUNCTION(accept_connect);
-PHP_FUNCTION(set_nonblock);
-PHP_FUNCTION(listen);
-PHP_FUNCTION(close);
-PHP_FUNCTION(write);
-PHP_FUNCTION(read);
-PHP_FUNCTION(getsockname);
-PHP_FUNCTION(getpeername);
-PHP_FUNCTION(socket);
-PHP_FUNCTION(connect);
-PHP_FUNCTION(strerror);
-PHP_FUNCTION(bind);
-PHP_FUNCTION(recv);
-PHP_FUNCTION(send);
-PHP_FUNCTION(recvfrom);
-PHP_FUNCTION(sendto);
-PHP_FUNCTION(build_iovec);
-PHP_FUNCTION(fetch_iovec);
-PHP_FUNCTION(free_iovec);
-PHP_FUNCTION(add_iovec);
-PHP_FUNCTION(delete_iovec);
-PHP_FUNCTION(set_iovec);
-PHP_FUNCTION(recvmsg);
-PHP_FUNCTION(sendmsg);
-PHP_FUNCTION(readv);
-PHP_FUNCTION(writev);
-PHP_FUNCTION(getsockopt);
-PHP_FUNCTION(setsockopt);
-PHP_FUNCTION(socketpair);
-PHP_FUNCTION(shutdown);
+PHP_FUNCTION(socket_fd_alloc);
+PHP_FUNCTION(socket_fd_free);
+PHP_FUNCTION(socket_fd_set);
+PHP_FUNCTION(socket_fd_isset);
+PHP_FUNCTION(socket_fd_clear);
+PHP_FUNCTION(socket_fd_zero);
+PHP_FUNCTION(socket_iovec_alloc);
+PHP_FUNCTION(socket_iovec_free);
+PHP_FUNCTION(socket_iovec_set);
+PHP_FUNCTION(socket_iovec_fetch);
+PHP_FUNCTION(socket_iovec_add);
+PHP_FUNCTION(socket_iovec_delete);
+PHP_FUNCTION(socket_select);
+PHP_FUNCTION(socket_create_listen);
+PHP_FUNCTION(socket_create_pair);
+PHP_FUNCTION(socket_accept);
+PHP_FUNCTION(socket_set_nonblock);
+PHP_FUNCTION(socket_listen);
+PHP_FUNCTION(socket_close);
+PHP_FUNCTION(socket_write);
+PHP_FUNCTION(socket_read);
+PHP_FUNCTION(socket_getsockname);
+PHP_FUNCTION(socket_getpeername);
+PHP_FUNCTION(socket_create);
+PHP_FUNCTION(socket_connect);
+PHP_FUNCTION(socket_strerror);
+PHP_FUNCTION(socket_bind);
+PHP_FUNCTION(socket_recv);
+PHP_FUNCTION(socket_send);
+PHP_FUNCTION(socket_recvfrom);
+PHP_FUNCTION(socket_sendto);
+PHP_FUNCTION(socket_recvmsg);
+PHP_FUNCTION(socket_sendmsg);
+PHP_FUNCTION(socket_readv);
+PHP_FUNCTION(socket_writev);
+PHP_FUNCTION(socket_getopt);
+PHP_FUNCTION(socket_setopt);
+PHP_FUNCTION(socket_shutdown);
typedef struct php_iovec {
struct iovec *iov_array;
@@ -80,6 +83,15 @@ typedef struct php_iovec {
} php_iovec_t;
typedef struct {
+#ifdef PHP_WIN32
+ SOCKET socket;
+#else
+ int socket;
+#endif
+ int type;
+} php_socket;
+
+typedef struct {
zend_bool use_system_read;
} php_sockets_globals;
@@ -93,17 +105,14 @@ typedef struct {
#endif
#else
-
#define phpext_sockets_ptr NULL
-
#endif
-#endif /* PHP_SOCKETS_H */
-
+#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- */
+ */ \ No newline at end of file