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
->connectToHost
("192.168.0.101",
600,
QIODevice::ReadWrite);
.
.
.
connect( tcpSocket, SIGNAL(readyRead()), this, SLOT(read_data()));
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)));
To copy to clipboard, switch view to plain text mode
If there is anyone who can explain what is happening and what a solution is I would like to hear it.
Thanks
Bookmarks