Added ondata option to allow streaming.