How can I transfer my data (XML) over UDP?

1k Views Asked by At

I used a library called TinyXML2 for creating my XML file that has all the data in it. Now I want to transfer my XML file over UDP. I know that I have to transfer node by node in my XML file. But I don't know the exact procedure. Can anyone tell me how to do it ?

<xml>
   <child>
       <firstchild id = "1">
            <age>10</age>
       </firstchild>
       <firstchild id = "2">
            <age>20</age>
       </firstchild>   
   </child>
</xml>
1

There are 1 best solutions below

0
On

https://beej.us/guide/bgnet/html/single/bgnet.html The holy grail to working with network sockets. Like others have said, you should use TCP. UDP is something you would use for video chat, use TCP for file transfer.