Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62374

Qt5.9 QTcpSocket connectToHost fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Out of scope
    • Affects Version/s: 5.9.0, 5.9.1
    • Fix Version/s: None
    • Component/s: Network: Sockets
    • Labels:
      None

      Description

      The Qt5.9 QTcpSocket  connectToHost() fail on macOS10.12.4  and windows 10. And test on Qt5.9 OK

      The code following:

      int main(int argc, char *argv[])
      
      {
      
      QCoreApplication a(argc, argv);
      
      QTcpSocket client;
      
      client.connectToHost(QHostAddress("10.176.0.22"), 13);
      
      if(client.waitForConnected()) qDebug()<<"Here0";
      
      QAbstractSocket::SocketState state = client.state();
      
      qDebug()<<state;
      
      if(client.waitForReadyRead())
      
      qDebug()<<"Here1";
      
      qDebug()<<client.readAll();
      
      return a.exec();
      
      }
      

       

      The output of value "state"  is :

      QAbstractSocket::UnconnectedState

        Attachments

        For Gerrit Dashboard: QTBUG-62374
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              feynman Feynman Li
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes