make the socket non-blocking, explicitly wait for data using poll()