<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Send files over network]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I want to create a chat for exchanging text and files too (photos, videos ...). Thus, each participant sends each participant text and files.<br />
I do not know how to organize it.<br />
I think setting up a peer to peer architecture. I found a tutorial ("here":<a href="http://qt-project.org/doc/qt-5/qtnetwork-network-chat-example.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-5/qtnetwork-network-chat-example.html</a>) to send text by peer to peer. However, I do not find how to send files.</p>
<p dir="auto">Does someone could help me achieve this?</p>
<p dir="auto">Thank you all.</p>
]]></description><link>https://forum.qt.io/topic/43227/send-files-over-network</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 18:56:24 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/43227.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 Jul 2014 08:58:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Send files over network on Wed, 02 Jul 2014 12:49:59 GMT]]></title><description><![CDATA[<p dir="auto">Just check out the documentation, please. QUdpSocket and QTcpSocket both inherit from QAbstractSocket, which inherits from QIODevice.</p>
<p dir="auto">You can use the same socket to send and receive text and binary data. It is your responsibility, however, to properly parse the data at the receiving end.</p>
<p dir="auto">Also, please remember that UDP protocol is stateless and does not guarantee the order the packets come in. It also does not warn on transmission errors.</p>
]]></description><link>https://forum.qt.io/post/234340</link><guid isPermaLink="true">https://forum.qt.io/post/234340</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Wed, 02 Jul 2014 12:49:59 GMT</pubDate></item><item><title><![CDATA[Reply to Send files over network on Wed, 02 Jul 2014 12:19:26 GMT]]></title><description><![CDATA[<p dir="auto">Ok, but in the tutorial, they use QUdpSocket instead of QTcpSocket. Can I use QDataStream with QUdpSocket ?<br />
In addition, do QDataStream allow me to send files and text or do I create 2 different sockets?<br />
If yes, I guess I just have to replace QString by QDataStream in the 'sendMessage' function, isn't it?</p>
]]></description><link>https://forum.qt.io/post/234337</link><guid isPermaLink="true">https://forum.qt.io/post/234337</guid><dc:creator><![CDATA[jere12]]></dc:creator><pubDate>Wed, 02 Jul 2014 12:19:26 GMT</pubDate></item><item><title><![CDATA[Reply to Send files over network on Wed, 02 Jul 2014 11:16:11 GMT]]></title><description><![CDATA[<p dir="auto">QTcpSocket inhertits from QIODevice, which can send any type of binary data. That means you can use QDataStream.</p>
]]></description><link>https://forum.qt.io/post/234328</link><guid isPermaLink="true">https://forum.qt.io/post/234328</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Wed, 02 Jul 2014 11:16:11 GMT</pubDate></item></channel></rss>