0

我使用了一个名为 TinyXML2 的库来创建包含所有数据的 XML 文件。现在我想通过 UDP 传输我的 XML 文件。我知道我必须在我的 XML 文件中逐个节点传输。但我不知道具体的程序。谁能告诉我该怎么做?

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

1 回答 1

0

https://beej.us/guide/bgnet/html/single/bgnet.html使用网络套接字的圣杯。正如其他人所说,您应该使用 TCP。UDP 用于视频聊天,使用 TCP 进行文件传输。

于 2018-05-24T23:32:22.177 回答