Added send_data() and recv_data() methods for send() and recv()