Socket Select()
| From: | will at 25sucks dot com | Date: | Fri, 09 Dec 2005 21:52:05 +0000 |
| Subject: | Socket Select() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-227233@lists.php.net to get a copy of this message | ||
Hi,
I'm working on writing a multi-client socket server and have a question
about the socket_select() function.
I've read through lots of example source on the web using BSD sockets
and select().
For some reason none of them ever populate the write fd set. They
only populate the read fd set.
$numchanged = socket_select($read,$write=NULL,$except=NULL,0);
The server examples I've seen usually just test for any incoming data
and then respond immediately with a socket_write,
they never bother using the write fd set to see if the socket can be
written to.
Can someone explain why, and maybe point me to some examples where it
would be useful to use the write fd set?
thanks alot,
will