Re: Undocumented Socket functions?

From: Date: Thu, 15 Feb 2001 09:07:24 +0000
Subject: Re: Undocumented Socket functions?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-39858@lists.php.net to get a copy of this message
"Daniel Grace" <dewin@oldbattery.com> wrote in message news:96g30n$jgi$1@toye.p.sourceforge.net... > "Rog" <rog@gameslate.com> wrote in message > news:4.2.2.20010214085022.00a5f3c0@direct.ca... > > Can anyone here decipher for me some of the undocumented Socket functions > > in PHP4? > > > > For instance, how do I use select() to multiplex multiple connections? > > > > With the functions that are documented, there is a nice example of a > simple > > echoing TCP server, but it only accepts a single connection which has > > limited usage. Can anyone come up with an example to expand that to > > multiple connections. > > I too would be interested in knowing this. I was once (and still am) > interested in developing a MUD (= multi-user text-based game) engine > entirely in PHP. This would be nice because powerful scripts and stuff like > that could be coded within the mud and executed on-the-fly if proper > considerations were taken towards stability and security. I'm not honestly sure if it'd be possible. Normally you would have a daemon running that listens for incoming connections and then spawns another process for each connection. Then the daemon goes back to listening. As far as I know, PHP doesn't have any sort of fork() or process spawning type commands. -- Rick Hodger

« previous php.general (#39858) next »