Re: problems re-reading from socket
| From: | Richard Lynch | Date: | Fri, 24 Nov 2006 19:41:59 +0000 |
| Subject: | Re: problems re-reading from socket | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245126@lists.php.net to get a copy of this message | ||
On Fri, November 24, 2006 1:21 pm, Martin Marques wrote:
> I have a daemon class which reads and answers using socket_read and
> socket_write functions. The things is that I connect to the daemon,
> sent a chain and the I get an answer, but after that the daemon get's
> struck in the next socket_read.
Have you set:
http://www.php.net/manual/en/function.socket-set-nonblock.php
It seems to me that if you don't, you are going to wait for 2048
bytes, no matter how little/much data is there...
Not an expert...
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?