tests/auto/qtcpserver/tst_qtcpserver.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   521 #endif
   521 #endif
   522     }
   522     }
   523 
   523 
   524     QTcpSocket findLocalIpSocket;
   524     QTcpSocket findLocalIpSocket;
   525     findLocalIpSocket.connectToHost(QtNetworkSettings::serverName(), 143);
   525     findLocalIpSocket.connectToHost(QtNetworkSettings::serverName(), 143);
   526     QVERIFY(findLocalIpSocket.waitForConnected(2000));
   526     QVERIFY(findLocalIpSocket.waitForConnected(5000));
   527 
   527 
   528     QTcpServer server;
   528     QTcpServer server;
   529     bool timeout = false;
   529     bool timeout = false;
   530     QVERIFY(server.listen(findLocalIpSocket.localAddress()));
   530     QVERIFY(server.listen(findLocalIpSocket.localAddress()));
   531     QVERIFY(!server.waitForNewConnection(1000, &timeout));
   531     QVERIFY(!server.waitForNewConnection(1000, &timeout));