http://www.madore.org/~david/computers/connect-intr.html
int flags = fcntl(socket, F_GETFL, 0);
fcntl(socket, F_SETFL, flags | O_NONBLOCK);
http://www.madore.org/~david/computers/connect-intr.html
int flags = fcntl(socket, F_GETFL, 0);
fcntl(socket, F_SETFL, flags | O_NONBLOCK);