Re: How to make a PHP Socket client crash-proof?
| From: | Richard Lynch | Date: | Thu, 09 Dec 2004 20:19:26 +0000 |
| Subject: | Re: How to make a PHP Socket client crash-proof? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-203860@lists.php.net to get a copy of this message | ||
Have you completely eliminated the possiblity of having a second,
independent, completely unrelated client/socket which is used to *SEND*
data to the server?
client_get <------ server
client_send -------> server
They can both use your local database to share data, to whatever degree
you deem necessary, but having one-way sockets for two different scripts
is way more easier than trying to get a two-way socket to work, in my
(limited) experience.
If you MUST push forward with a two-way socket, try to determine the state
of the world inside your infinite loop. Why aren't you breaking out of
that loop? Can you do *anything* to break out?
I suspect that once you have started SENDING data to the server, it's
going to just keep waiting for you to send more. How do you signal the
end of your data to be sent? Does the server understand that signal?
--
Like Music?
http://l-i-e.com/artists.htm