QTcpServer::listen() network time out

  • I have the simplest of servers (just for test), but on one Windows 7 machine this fails

    server->listen( QHostAddress::All,5000);

    with an error of "Network Operation Timed Out". Using Qt 5.8 with MSVC2015 and the machine is dual-NIC. It is also running McAfee Host Intrusion Prevention if that is relevant, and the settings are beyond my control. The program works fine on another Windows 7 computer (a laptop). Also it works fine with ::LocalHost, but then I have no access from other computers.

    Has anyone experienced this before... any ideas?

  • @gmm398

    Hi and welcome to devnet

    Does the error message come immediately?

    Probably it is a firewall issue as you already suspect. You would need to with the AV if there is a setting respectively a notice. Check if you allow listening to the port.

    When the error message pops up immediately, you could disable the AV's firewall for a while and check if it the error pops up after enabling the firewall.

  • It takes around 5 seconds (as opposed to a second or less when it works with LocalHost).

    I tried a pure winsock program (straight C++) and that works fine "" and "::" , so it does not appear to be a firewall problem. The laptop that the Qt sample worked on has the same firewall.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.