Replace SIGALRM timeout with SO_RECVTIMEO

Support for sub-second timeouts!
Close socket when finished