PDA

View Full Version : HELP ME - socket error in linux



donzaza
20th September 2008, 20:20
Hi guys

i have a really big problem.
Well, i have a server-client software written by university friends using qt4.4.

In the server we have this connect


QObject::connect(socketTcpIp, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(connectionerror(QAbstractSocket::SocketError) ));
}

void Server::connectionerror(){
qDebug(" Plug out the ethernet cable");

}

well, the problem is with the SIGNAL.
Under Windows Xp, when I plug out the cable the signal is normally emitted,
but under linux (tried on gentoo and ubuntu) noting happens(the signal is not emitted).
I did some checks under my linux box, and I saw that plugging out the cable the socket is not closet by operating system(netstat -a say this).
Then, if I plugged in the cable again, the connection become restored.

Really thanks