TCPSocket client



  • Hi!
    I am developing an application to connect with a laser tracker. After the connection and several communications there is some commands where I get no answer. Actually I get an answer but kind of late it could take several minutes. The supplier of the tracker supported me with a communication analyzer and it seems that the answer it is immediate however the function is it called way later in my program. Also I have checked if I get an error but I don´t. Any idea of this issue?

    @ m_sock = new QTcpSocket(this);
    connect(m_sock, SIGNAL(connected()), this, SLOT(connected()));
    connect(m_sock, SIGNAL(disconnected()), this, SLOT(disconnected()));
    connect(m_sock, SIGNAL(readyRead()), this, SLOT(readyRead()));
    connect(m_sock, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWritten(qint64)));
    connect(m_sock, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(displayError(QAbstractSocket::SocketError)));@

    Thanks!!



  • Hi,

    if you want acheive a high performance communication, I suggest to move the task in another Thread.
    Main (GUI) Thread receive and process several events from Windows System.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.