Use the send_data functions. They are general purpose functions and you can emulate any send function through them.