Thunder
1st August 2008, 21:24
Hi I am encountering a problem with my program when it try to connect to another machine using QTCPSocket. I keep getting the message QNativeSocketEngine::write() was not called in QAbstractSocket::ConnectState continuously at a very fast interval.
Below is some code I have to connect to a Server.
tcpSocket1 = new QTcpSocket();
tcpSocket1->connectToHost("192.168.0.101", 600, QIODevice::ReadWrite);
.
.
.
connect( tcpSocket, SIGNAL(readyRead()), this, SLOT(read_data()));
connect( tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(displayError(QAbstractSocket::SocketError)));
If there is anyone who can explain what is happening and what a solution is I would like to hear it.
Thanks
Below is some code I have to connect to a Server.
tcpSocket1 = new QTcpSocket();
tcpSocket1->connectToHost("192.168.0.101", 600, QIODevice::ReadWrite);
.
.
.
connect( tcpSocket, SIGNAL(readyRead()), this, SLOT(read_data()));
connect( tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(displayError(QAbstractSocket::SocketError)));
If there is anyone who can explain what is happening and what a solution is I would like to hear it.
Thanks