Re: sockets
| From: | Chris Shiflett | Date: | Fri, 22 Nov 2002 05:39:39 +0000 |
| Subject: | Re: sockets | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125557@lists.php.net to get a copy of this message | ||
I'm not sure if it would be helpful, but I wrote a quick PHP socket
application that implements a specialized HTTP proxy. It's a quick
hack of sorts, but I have found it to be very stable, and it uses the
latest sockets API. It consists of only one small PHP script, and
it's fairly well commented. You're welcome to check it out, and maybe
it can answer some of your questions by example.
http://protoscope.org/
Chris
--- Gareth Thomas <gdthomas@mercurysoft.com> wrote:
> I realise that sockets is still 'experimental' but any help will
> be much appreciated. I am developing a queue system to send
> commands across from a server to a client using sockets. Problem
> is that the I keep getting a 'connection reset by peer' error
> after the first command is sent. The server script itself is in
> a loop which I believe should maintain the socket connection. I
> am using socket_write() to send the data across the socket,
> and I am wondering if I should be using socket_send()? Does
> anyone have any ideas or experience of doing this?