I'm trying to accept a socket non-blockingly:
accept4(s, (struct sockaddr *) &peerAddress, &len,SOCK_NONBLOCK);
where as s is a fd, peerAddres is an address, and len, is its length. I wish that accept won't block the thread. Though, once I debug, the process is stuck at this line, while no connection is pending. What is my mistake?