[SOLVED]QAbstractSocket::disconnected() signal also emitted when error(..) signal is emitted ?
KA51O last edited by
The documentation of QAbstractSocket only states this on the subject:
[quote] If the remote host closes the connection, QAbstractSocket will emit error(QAbstractSocket::RemoteHostClosedError), during which the socket state will still be ConnectedState, and then the disconnected() signal will be emitted.
So can I expect the disconnected() signal to be always emitted when the error(QAbstractSocket::SocketError) signal is emitted ?
mcosta last edited by
disconnected() is emitted each time socket goes to UnconnectedState from ConnectedState; alse if you call disconnect().
error() is emitted only when system detect an error.
This means that on error you receive error() and disconnected()