Qt-interest Archive, January 2008
Trivial QTcpServer does not listen to port
Message 1 in thread
QT4.3.1 + VC6
Hi there,
I am trying to reproduce the Threaded Fortune Server from QT demo on my
application, but I can't understand what is going wrong. I have created a
"class CWittyServer : public QTcpServer", which is an exact copy from QT
demo "class FortuneServer : public QTcpServer" . There is no change at all.
Then I do the following:
TcpServer = new CWittyServer();
QHostAddress hostAddress = QHostAddress("127.0.0.1");
if(TcpServer->listen(hostAddress,piPort))
qDebug("ok");
else
qDebug("not ok");
piPort = 5300, but it can be any other. I get the "ok" debug message,
although it doesn't look like a running server. First, Windows Firewall (ok,
some jokes are acceptable) doesn't gives any warn about the running service.
The Threaded Fortune Server does. Second it doesn't reposnd to the QT Demo
Fortune Client. Third, I try to start an MySQL server on the same port, just
for testing, and it says thar the port is busy. Does any one can give me a
tip of what it is going wrong?
Thanks in advance,
Flávio Mello