summaryrefslogtreecommitdiff
path: root/ext/sockets/php_sockets.h
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2007-07-22 23:01:20 +0000
committerJani Taskinen <jani@php.net>2007-07-22 23:01:20 +0000
commit0b40ec1f1949731f46680bbb5ed595f03aaaca0d (patch)
treec285291b60a99cacb5745d4cbc803fd6cd7adb1d /ext/sockets/php_sockets.h
parent815d8a974364be5f23392930123c2407620eaf24 (diff)
downloadphp-git-0b40ec1f1949731f46680bbb5ed595f03aaaca0d.tar.gz
MFH:- Fixed bug #21197 (socket_read() outputs error with PHP_NORMAL_READ)
Diffstat (limited to 'ext/sockets/php_sockets.h')
-rw-r--r--ext/sockets/php_sockets.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index b89f4f6eb4..3163d76ef7 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -45,7 +45,9 @@ PHP_RSHUTDOWN_FUNCTION(sockets);
PHP_FUNCTION(socket_select);
PHP_FUNCTION(socket_create_listen);
+#ifdef HAVE_SOCKETPAIR
PHP_FUNCTION(socket_create_pair);
+#endif
PHP_FUNCTION(socket_accept);
PHP_FUNCTION(socket_set_nonblock);
PHP_FUNCTION(socket_set_block);
@@ -81,13 +83,14 @@ typedef struct {
PHP_SOCKET bsd_socket;
int type;
int error;
+ int blocking;
} php_socket;
/* Prototypes */
#ifdef ilia_0 /* not needed, only causes a compiler warning */
static int php_open_listen_sock(php_socket **php_sock, int port, int backlog TSRMLS_DC);
static int php_accept_connect(php_socket *in_sock, php_socket **new_sock, struct sockaddr *la TSRMLS_DC);
-static int php_read(int bsd_socket, void *buf, size_t maxlen, int flags);
+static int php_read(php_socket *sock, void *buf, size_t maxlen, int flags);
static char *php_strerror(int error TSRMLS_DC);
#endif