Qt World Summit: Submit your Presentation

QTcpSocket doesn't timeout

  • Hi All,

    I am developing a client-server application using QTcpSocket. Each side turn on a specific computer and the two computer are connected to the same network.

    The communication between the server and the client goes well but when i disable the interface connection (wlan0) of the client computer, the socket state still "QAbstractSocket::ConnectedState"and it doesn't timeout.

    I tried to fix this problem by setting the KeepAliveOption but this didn't resolve the problem.

    Have you any idea how to disconnect the client when the interface is disabled?

    Any help would be appreciated.

Log in to reply