Unsolved TcpSocket signal readyRead not received
-
@VRonin ,onReadyRead is a part of public slots.
I tried that you suggested and alsoconnect(socket, &QIODevice::readyRead,this, &CSocatMonitor::onReadyRead);
The result is the same.
-
Are you blocking the event loop?
-
@VRonin I'm not blocking anything(AFIK)...The connect is triggered, also, the errors...
-
How are you sending the data to this client?
-
@VRonin Just typing into the stdio. This output is provided by socat over the TCP.
-
@Catalin.O said in TcpSocket signal readyRead not received:
Just typing into the stdio. This output is provided by socat over the TCP.
Can you post code?
-
@Taz742 You mean the headers and all the sources ?
-
@Catalin.O
Yes, it would be better. -
@Catalin.O said in TcpSocket signal readyRead not received:
in.startTransaction();
QString nextFortune; in >> nextFortune; if (!in.commitTransaction()) return;
Unless your server knows what Qt is and how it should send you
QString
s throughQDataStream
version 5.9, then this should always fail and you'd get nowhere with your slot. -
@Taz742 Ok....
class CSocatMonitor : public QDialog
.....
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
CSocatMonitor * monitor = CSocatMonitor::getInstance();
monitor->init();return a.exec();
}
-
@kshegunov Your suggestion solved my blocking point. Thank you.