Ver Mensaje Individual
  #2 (permalink)  
Antiguo 15/04/2015, 14:07
Reynolds
 
Fecha de Ingreso: febrero-2015
Ubicación: France
Mensajes: 12
Antigüedad: 9 años, 2 meses
Puntos: 1
Respuesta: Sockets Congelado

Hola,

Ha intenta con O_NONBLOCK ?

Por ejemplo :

Código:
#include <fcntl.h>

/*...*/

int estado;

tcp_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

if ((estado = fcntl(tcp_socket, F_GETFL, 0)) == -1) /* intenta de recuperar flags */
        estado = 0; 

fcntl(tcp_socket, F_SETFL, estado | O_NONBLOCK) /* y añadir el estado "no bloqueando" */


/*...*/