PDA

View Full Version : QSocketTCP Is connected



hassinoss
11th February 2014, 22:02
How can we know if QSocketTCP is connected to server TCP or no?

Thank you in advance

ChrisW67
12th February 2014, 00:03
If you have called QAbstractSocket::connectToHost() and received a connected() signal (and neither QAbstractSocket::error() nor QAbstractSocket::disconnected() signals) then you are connected.

wysota
12th February 2014, 08:29
You can always query the socket state using QAbstractSocket::state().

hassinoss
13th February 2014, 17:33
thank you for your answer