Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/10/2008, 07:05
venkman
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Problemón con timeout del telnet

Intentas poner el socket como no bloqueante antes de haberlo abierto. Eso no está bien.

Tampoco estaría mal asegurarte de que el socket se ha abierto correctamente:

Código php:
Ver original
  1. $this->sock = fsockopen($host, $port, $errorno, $errorstr, 11);
  2. if (!$this->sock){
  3.     echo "Error al abrir el socket: errno=$errno,errstr=$errstr";
  4.     return 0;
  5. } else {
  6.     stream_set_blocking($this->sock, FALSE );
  7.     //...