Re: Problem with getting non-blocking data from stdin
| From: | Dan Anderson | Date: | Sat, 20 Sep 2003 05:53:19 +0000 |
| Subject: | Re: Problem with getting non-blocking data from stdin | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163276@lists.php.net to get a copy of this message | ||
I find your responses to my e-mails quite humorous. Upon review --
aside from a single WTF -- I don't think I was condescending in any way
shape or form. I was just trying to offer help.
After reading about wrappers, I find it doubly humorous that you didn't
just disregard my e-mail when I asked you why you were using "php://".
It's not like I said: "php://" isn't a valid protocol. "http://" and
"ftp://" are all PHP supports. I just said "Why are you
using php://"
below?
And I also qualified my statements about fsockopen() and
set_stream_blocking by saying "I seem to remember" and "If I remember
correctly". And, yes, in PHP 3.0 or whatever it was that was true.
Hence the "if I remember".
So, it would seem to me that as soon as you got to the WTF you should
have said, "This guy thinks I am a noob". And at that point you should
have just said "thanks but you're wrong".
And, just for the record, you never explicitly stated that you needed a
reason to read in only one character at a time. You just sent a bunch
of code down the pipe. So it seems quite natural to assume you're just
making a noobish mistake -- reading a char at a time when a string will
do.
Anyways, you are running an infinite loop and I don't quite see how this
is exiting:
while (1)
{
if ()
else
}
But, hey, more power to you if you've gotten to the level where you
don't understand why people who don't understand some esoteric function
are such muppets.
BTW: If you insist on keeping up with the flamethrowers kindly e-mail me
off list so as not to bother others on the listserv.
-Dan