Re: Net_IRC class
| From: | Markus Fischer | Date: | Wed, 17 Apr 2002 12:05:18 +0000 |
| Subject: | Re: Net_IRC class | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5601@lists.php.net to get a copy of this message | ||
On Wed, Apr 17, 2002 at 12:57:09PM +0100, Richard Heyes wrote :
> > Richard Heyes wrote:
> > >
> > > "Tomas V.V.Cox" <cox@idecnet.com> wrote:
> > >
> > > > I'm going to start coding a Net_IRC class. I'll get paid for that so I
> > > > wish to implement many things. Any suggestion is always welcome :-)
> > >
> > > Multiple server support using socket_select(). :)
> > >
> >
> > Do you know if is it stable enought? Other way not so powerful
> > (allthought more soported) for doing this async connection could be
> > using declare(). IO_Async would helped here a lot :-)
>
> Well I guess there's always the method of opening multiple sockets in non
> blocking mode, using a while(true) loop and checking each socket on each
> iteration of the loop. But that's kind of icky.
With socket_select() this is exactly the way it works. You
create and connect multiple sockets to endpoints, put them
all in the socket_select() call and wait if you got a
READ/WRITE/ERROR from a socket.
I don't see a way to avoid this, do you (would be nice) ?
- Markus
--
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah...
none :)"