<?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[QSslSocket behavior]]></title><description><![CDATA[<p dir="auto">Hello all,<br />
I'm having a very strange behavior with QSslSocket: I'm developing a client/server application over TCP (application protocol is proprietary).  I'm using RSA for public key protocol used for authentication, AES-128 for symmetric cipher and SHA for hash.</p>
<p dir="auto">My protocol is using several ports: 2 of them are used for control (small messages, less than 150 chars most of the time), a last one is used for file transfer.</p>
<p dir="auto">Everything works fine as long as I'm using 4K length RSA keys.</p>
<p dir="auto">When decreasing RSA key length (1024/2048 instead of 4096), <em>file transfer does not work any more</em>. Small messages exchange on other ports is still ok though.</p>
<p dir="auto">When I'm saying that file transfer does not work, it means that onReadyRead() slot of QSslSocket is never called, not even once. I checked with Wireshark that data was actually sent and actually arrived on server, so issue is inside Qt itself.</p>
<p dir="auto">Any idea of what is going on ?</p>
<p dir="auto">Thanks in advance</p>
]]></description><link>https://forum.qt.io/topic/33041/qsslsocket-behavior</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 19:55:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/33041.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Oct 2013 06:39:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QSslSocket behavior on Mon, 14 Oct 2013 11:47:36 GMT]]></title><description><![CDATA[<ul>
<li>looks like onReadyRead() slot is not called while some data are available for reading: this looks like a Qt bug !<br />
For me it happened with Qt4.7.4, need to check if this may also happen with newer versions...</li>
</ul>
<p dir="auto">A workaround consists in forcing 1st call to onReadyRead() slot after waiting for available bytes to be there:</p>
<p dir="auto">@<br />
while (!_socketClient-&gt;bytesAvailable())<br />
{<br />
QCoreApplication::processEvents();<br />
}</p>
<p dir="auto">onReadyRead();<br />
@</p>
<p dir="auto">Then for following data chunks, Qt fortunately calls onReadyRead() as expected...<br />
For information I'm on Windows 32-bits, but this may well happen also on Linux. To be checked also...</p>
]]></description><link>https://forum.qt.io/post/198958</link><guid isPermaLink="true">https://forum.qt.io/post/198958</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Mon, 14 Oct 2013 11:47:36 GMT</pubDate></item></channel></rss>