<?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[[Solved] QTcpServer.listen() always returns false]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I'm working on a project about a basic TCP connection. At present, I'm developing the server. The constructor code is as follows:</p>
<p dir="auto">@Server::Server(QObject* parent): QObject(parent)<br />
{<br />
connect(&amp;server, SIGNAL(newConnection()), this, SLOT(acceptConnection()));</p>
<pre><code>if (!server.listen(QHostAddress::Any, 888))
qDebug("Server could not start");
</code></pre>
<p dir="auto">}@</p>
<p dir="auto">The problem is that the listen function is always returning false..<br />
What can be the issue please?</p>
<p dir="auto">Newbie, I'm working on Fedora16 in Virtual Machine<br />
QtCreator 2.3.1<br />
Qt4.8.1</p>
<p dir="auto">Thks</p>
]]></description><link>https://forum.qt.io/topic/47278/solved-qtcpserver-listen-always-returns-false</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 12:57:09 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/47278.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Oct 2014 14:59:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Solved] QTcpServer.listen() always returns false on Tue, 21 Oct 2014 16:14:59 GMT]]></title><description><![CDATA[<p dir="auto">Yes that's it! Thanks a lot</p>
]]></description><link>https://forum.qt.io/post/248536</link><guid isPermaLink="true">https://forum.qt.io/post/248536</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 21 Oct 2014 16:14:59 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved] QTcpServer.listen() always returns false on Tue, 21 Oct 2014 15:27:08 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">You are trying to use a system reserved port number, that's why it fails. You should use something over 1023 for your application, or let QTcpServer get one port automatically.</p>
]]></description><link>https://forum.qt.io/post/248534</link><guid isPermaLink="true">https://forum.qt.io/post/248534</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 21 Oct 2014 15:27:08 GMT</pubDate></item></channel></rss>