PDA

View Full Version : Notification for network disconnection



yogesh
11th March 2009, 16:17
Hi,
I am using QAbstractSocket with type as "tcp". I want to know whether I can get a notification whenver there is a problem in network and connection is broken?? If so how can I do it??

ComaWhite
11th March 2009, 19:50
Are you building a TCP socket off of QAbstractSocket when there is QTcpSocket? Because all you need to do when you use QTcpSocket is just create 2 slots and connect them to error() and state() of the QTcpSocket and you can have tons of errors based on what is happening.

yogesh
12th March 2009, 06:55
Hi,
In case I connect the error() signal of the socket will I be able to get the notification of when the connection is breaking without me invoking any of the APIs ??