[英]How can I transfer my data (XML) over UDP?
I used a library called TinyXML2 for creating my XML file that has all the data in it. 我使用了一个名为TinyXML2的库来创建包含所有数据的XML文件。 Now I want to transfer my XML file over UDP. 现在,我想通过UDP传输XML文件。 I know that I have to transfer node by node in my XML file. 我知道我必须在XML文件中逐节点传输。 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>
https://beej.us/guide/bgnet/html/single/bgnet.html The holy grail to working with network sockets. https://beej.us/guide/bgnet/html/single/bgnet.html使用网络套接字的圣杯。 Like others have said, you should use TCP. 就像其他人所说的,您应该使用TCP。 UDP is something you would use for video chat, use TCP for file transfer. UDP是用于视频聊天的东西,使用TCP进行文件传输。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.