in reply to How do I do a non-blocking accept?
fcntl(sockfd,F_SETFL,FNDELAY)
can be used to set the file descriptor in to a non blocking mode, any blocking system call on this descriptor including accept will return immediately and set the errno=EWOULDBLOCK
regards
rakesh soni