Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

HELP ME - socket error in linux

  1. Sep 20, 2008 #1
    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
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted