Browse Source

* php4/ext/sockets.c, php4/ext/php_sockets.h:

Numerous changes. Many prototypes changed to be more like the
	appropriate *NIX counterparts. Many new prototypes defining many
	more advanced socket routines. Better AF_UNIX socket support.
	bind() now recognizes the socket type and acts appropriately,
	instead of needing the AF_* for the socket passed in.
# Something I'd like to write yet is proper signal() support. Unfortunately,
# the last time I tried, doing anything with the signal except ignoring it
# caused PHP to segfault. And to have decent socket support.. at least, from
# my experience, having signals is a good thing. Only problem.. to implement
# it, some changes would have to be made to the parser - since that is where
# the problems lie on handling asynchronous signals.
PHP-4.0.5
Chris Vandomelen 26 years ago
parent
commit
fd3d84ee52
  1. 18
      ext/sockets/php_sockets.h
  2. 1103
      ext/sockets/sockets.c

18
ext/sockets/php_sockets.h

@ -42,7 +42,6 @@ PHP_RINIT_FUNCTION(sockets);
PHP_RSHUTDOWN_FUNCTION(sockets);
PHP_MINFO_FUNCTION(sockets);
PHP_FUNCTION(confirm_sockets_compiled); /* For testing, remove later. */
PHP_FUNCTION(confirm_sockets_compiled);
PHP_FUNCTION(fd_alloc);
PHP_FUNCTION(fd_dealloc);
@ -58,13 +57,28 @@ PHP_FUNCTION(listen);
PHP_FUNCTION(close);
PHP_FUNCTION(write);
PHP_FUNCTION(read);
PHP_FUNCTION(signal);
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);
/* Fill in this structure and use entries in it
for thread safety instead of using true globals.

1103
ext/sockets/sockets.c
File diff suppressed because it is too large
View File

Loading…
Cancel
Save