UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2002-07-27 12:01 AM

HectorLasso
Administrator
From: Colombia
Registered: 2002-06-12
Posts: 353

Re: 6.1 - How would I put my socket in non-blocking mode?

/* set socket to non-blocking i/o */ 
    sts = ioctl(ccp->main_sock, FIONBIO, (char *)&one); 
    if (sts) 
    { 
        setproderr(PE_TCPERROR, GEL_FATAL); 
        sprintf(line,"ioctl (main) failed - %s",strerror(errno)); 
tcpabort(); 
    }

Offline

Board footer

Powered by FluxBB