Topic awaiting preservation: PHP OO Classes and Instantiation (Page 1 of 1) |
|
---|---|
Maniac (V) Mad Scientist From: :morF |
posted 01-22-2006 13:28
Just a quick question or three. I'm currently writing a PHP script that will connect to a remote server and communicate via a socket. Putting and getting commands and such forth. I'm taking my first stab at using classes in PHP to try and create a non-blocking command buffer so that this script can process multiple commands at once, even if the output resulting from one command will take a while to be recieved at the other end. So, each line that gets read from the command buffer (up to a maximum of, say, 5 or 7 commands processing at one time, because infinite limits on things will just cause problems) will instantiate its own version of the command processor, and then once that command is done, it removes itself and waits for the next. |
Neurotic (0) Inmate Newly admitted From: |
posted 01-22-2006 19:34
Answer to |
Paranoid (IV) Inmate From: Madison, Indiana, USA |
posted 01-22-2006 20:27
quote:
|
Maniac (V) Mad Scientist From: :morF |
posted 01-23-2006 07:03
Actually what it technically is is the response-server part of a server-to-multiclient relationship. This will eventually form an IRC bot, so it's not a full IRCD server, not by a long-shot. From the IRCD's point of view it's another client. From the client's point of view it's a network service. But, good to know my original idea is the better. Thanks! |
Maniac (V) Mad Scientist From: :morF |
posted 01-23-2006 11:57
Oh... I see what you meant, though, hyperbole, and you've got it a little backwards. This script doesn't accept incoming sockets, it generates an outgoing socket to an existing server. |