Made socket non-blocking. pthreads still blocking.