Receiving data is now done in a separate thread.