0

I am using QTcpSocket to connect to given host:

QHostAddress oAddr( u32Addr);
QTcpSocket* poSocket = new QTcpSocket(this);
connect(poSocket, SIGNAL(connected()), this, SLOT(readCheckConnection()));
poSocket->connectToHost( oAddr, 80);

I am not using waitForConnected() because I try to connect many hosts at once, sometimes with quite long time connection so I need to count on connected() signal.

Everything works fine with Windows 10, problem appears with Windows 11. Signal connected() is emitted although there is no host existing. Moreover when socket state is checked it also returns CONNECTED state. I am working wit QT 5.15.2. What may cause this problem?

hus
  • 117
  • 1
  • 7

0 Answers0