cvs: php4 /ext/sockets sockets.c
| From: | Egon Schmid | Date: | Wed, 05 Jul 2000 18:33:33 +0000 |
| Subject: | cvs: php4 /ext/sockets sockets.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-630@lists.php.net to get a copy of this message | ||
eschmid Wed Jul 5 11:33:33 2000 EDT
Modified files:
/php4/ext/sockets sockets.c
Log:
Fixed some protos.
Index: php4/ext/sockets/sockets.c
diff -u php4/ext/sockets/sockets.c:1.1 php4/ext/sockets/sockets.c:1.2
--- php4/ext/sockets/sockets.c:1.1 Sun Jul 2 21:35:57 2000
+++ php4/ext/sockets/sockets.c Wed Jul 5 11:33:32 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sockets.c,v 1.1 2000/07/03 04:35:57 chrisv Exp $ */
+/* $Id: sockets.c,v 1.2 2000/07/05 18:33:32 eschmid Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -192,8 +192,7 @@
*/
/* {{{ proto resource fd_alloc(void)
- Allocate a file descriptor set
- */
+ Allocate a file descriptor set */
PHP_FUNCTION(fd_alloc)
{
fd_set *set;
@@ -211,9 +210,8 @@
/* }}} */
/* {{{ proto void fd_dealloc(void)
- De-allocate a file descriptor set
- ** BUG: This is currently a no-op!
- */
+ De-allocate a file descriptor set */
+/* ** BUG: This is currently a no-op! */
PHP_FUNCTION(fd_dealloc)
{
RETVAL_TRUE;
@@ -244,8 +242,7 @@
/* }}} */
/* {{{ proto bool fd_clear(long fd, resource set)
- Clear a file descriptor from a set
- */
+ Clear a file descriptor from a set */
PHP_FUNCTION(fd_clear)
{
zval **set, **fd;
@@ -268,7 +265,7 @@
/* }}} */
/* {{{ proto bool fd_isset(long fd, resource set)
- Check to see if a file descriptor is set within the file descrirptor set */
+ Check to see if a file descriptor is set within the file descriptor set */
PHP_FUNCTION(fd_isset)
{
zval **set, **fd;
@@ -314,18 +311,22 @@
/* }}} */
/* {{{ proto void select(long max_fd, resource readfds, resource writefds, resource exceptfds, long
tv_sec, long tv_usec)
- Runs the select() system call on the sets mentioned with a timeout
- specified by tv_sec and tv_usec. See select(2) man page for details.
+ Runs the select() system call on the sets mentioned with a timeout specified by tv_sec and
tv_usec */
+/*
+ See select(2) man page for details.
From man page:
select waits for a number of file descriptors to change status.
- Three independent sets of descriptors are watched. Those in readfds will be watched to see if
charac-
- ters become avaliable for reading, those in writefds will be watched to see if it is ok to
immediately
- write on them, and those in exceptfds will be watched for exceptions. On exit, the sets are
modified
- in place to indicate which descriptors actually changed status.
+ Three independent sets of descriptors are watched. Those in
+ readfds will be watched to see if characters become avaliable for
+ reading, those in writefds will be watched to see if it is ok to
+ immediately write on them, and those in exceptfds will be watched
+ for exceptions. On exit, the sets are modified in place to
+ indicate which descriptors actually changed status.
- -1 is passed for any sets for which NULL would be passed to the system call.
+ -1 is passed for any sets for which NULL would be passed to the
+ system call.
*/
PHP_FUNCTION(select)
@@ -424,8 +425,7 @@
/* }}} */
/* {{{ proto int accept_connect(long fd)
- accepts a connection on the listening socket fd
- */
+ Accepts a connection on the listening socket fd */
int accept_connect(int fd, struct sockaddr *la)
{
int foo, m;
@@ -458,8 +458,7 @@
/* }}} */
/* {{{ proto bool set_nonblock(long fd)
- sets nonblocking mode for file descriptor fd
- */
+ Sets nonblocking mode for file descriptor fd */
PHP_FUNCTION(set_nonblock)
{
zval **fd;
@@ -480,8 +479,7 @@
/* }}} */
/* {{{ proto bool listen(long fd, long backlog)
- sets the maximum number of connections allowed to be waited for on
- the socket specified by fd */
+ Sets the maximum number of connections allowed to be waited for on the socket specified by fd */
PHP_FUNCTION(listen)
{
zval **fd, **backlog;
@@ -579,8 +577,7 @@
/* }}} */
/* {{{ proto long getsockname(long fd, string &addr, long &port)
- Given an fd, stores a string representing sa.sin_addr and the value of sa.sin_port
- int addr and port describing the local side of a socket. */
+ Given an fd, stores a string representing sa.sin_addr and the value of sa.sin_port int addr and
port describing the local side of a socket */
/* A lock to prevent inet_ntoa() from causing problems in threading */
volatile int inet_ntoa_lock = 0;
@@ -673,8 +670,7 @@
#endif
/* {{{ proto long getpeername(long fd, string &addr, long &port)
- Given an fd, stores a string representing sa.sin_addr and the value of sa.sin_port
- int addr and port describing the remote side of a socket. */
+ Given an fd, stores a string representing sa.sin_addr and the value of sa.sin_port int addr and
port describing the remote side of a socket */
PHP_FUNCTION(getpeername)
{
@@ -765,8 +761,7 @@
#endif
/* {{{ proto long socket(string domain, string type, long protocol)
- Creates an endpoint for communication in the domain specified by domain, of type specified by
type
- */
+ Creates an endpoint for communication in the domain specified by domain, of type specified by
type */
PHP_FUNCTION(socket)
{
zval **domain, **type, **protocol;
@@ -877,9 +872,9 @@
}
/* }}} */
-/* {{{ proto long bind(long sockfd, string domain, ...)
- Binds an open socket to a listening port
- -- domain = "af_unix", 3rd arg is path to socket
+/* {{{ proto long bind(long sockfd, string domain [, string ...])
+ Binds an open socket to a listening port */
+/* -- domain = "af_unix", 3rd arg is path to socket
-- domain = "af_inet", 3rd arg is address to bind to, 4th arg is port */
PHP_FUNCTION(bind)
{