use nonblocking sockets for receive thread