Improve send function for transmitting all prepared data.
Revert "Improve send function for transmitting all prepared data."

This reverts commit ad81b2bb61816b1b78692d18aa2c81dce9dcb252.