I have this stupid issue, I have opened a socket using fsockopen, I'm reading and writing to this socket, but at some point, I'll be waiting for data from that socket, and depending on data input I would write something to the socket, also I actually don't know how many lines the data would be, I can put a little sleep to be sure that all I need is send, but how can I read all the data that is currently in the buffer,
I tried to use
while (!feof($sockethandler)) {
$this->out = fgets($sockethandler );
}
but I the script just freezes as it does not get any EOF, or EOT signal, I only can use this when I send a quit command to the socket so i read all the rest of the data sent,
What i need is to read all whats in the buffer right now ....?
Any ideas ....
--
Ala'a A. Ibrahim
http://360.yahoo.com/bai_83
http://alaa83.blogspot.com/
_______________________________________________ General mailing list [email protected] http://mail.jolug.org/mailman/listinfo/general_jolug.org
