- /* Send binary data */
- LOG_TIMING("start-remote-send thread=%1", boost::this_thread::get_id());
- _frame->send_binary (socket);
+ /* Send XML metadata */
+ string xml = doc.write_to_string ("UTF-8");
+ socket->write (xml.length() + 1);
+ socket->write ((uint8_t *) xml.c_str(), xml.length() + 1);
+
+ /* Send binary data */
+ LOG_TIMING("start-remote-send thread=%1", thread_id ());
+ _frame->write_to_socket (socket);
+ }