sockets: change inet_connect() to support nonblock socket