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.
The problem appears to be here (a method from my class). I put the 2 echos
for debugging purposses:
function socketRead(){
echo "Vamos a leer nomas!\n";
$lectura = socket_read($this->conexion, 2048, PHP_NORMAL_READ);
echo $lectura;
return $lectura;
}
In th output from the socket daemon I get the 2 strings (generated by
the 2 echos), after that I get again the first echo, but no matter how
I try to send a new string to the socket, it just stays there reading
from the socket.
By the way $this->conexion is a socket resource from socket_accept. Also
the socket reads and answers one time, so it is working, but after that
first answer it stays reading. All this I'm testing from the console using
a telnet to the socket.
--
---------------------------------------------------------
Lic. Martín Marqués | SELECT 'mmarques' ||
Centro de Telemática | '@' || 'unl.edu.ar';
Universidad Nacional | DBA, Programador,
del Litoral | Administrador
---------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php