Re: Help with sockets
| From: | Stephen Brewster | Date: | Fri, 19 Jul 2002 11:18:23 +0000 |
| Subject: | Re: Help with sockets | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108476@lists.php.net to get a copy of this message | ||
1) you use whats called an "Itterative Server Model". That is to say you
create an list of all the sockets you are using and pass them to
"socket_select" (http://www.php.net/manual/en/function.socket-select.php)
and it will tell you which ones are ready to be read from, which can be
written to and which have exceptions.
2) I am not too sure what you mean here but using the select you can find
out which socket have info in their buffers and then read it so there will
be no blocking on I/O
--
------------------------------------------------------
Stephen Brewster
Email: steve@cite.co.uk
Tel: 0116 2335545
Mobile: 07776 475849
ICQ: 383095
------------------------------------------------------
UNIX SEX
unzip; strip; touch; finger; mount; fsck; more; yes; umount; sleep
"Jeremy" <jeremy@webconflux.com> wrote in message
news:004401c22edc$a848a090$0202a8c0@L5...
> How can I do the following with PHP?
>
> 1) Accept more than 1 connections without forking
> 2) socket_read and fgets from 2 connections at the same time
>
> please help!
> thanks in advance
>
>
>
>