Hi,
My server run method:
void Thread::run()
{
if (!m_qSocket.setSocketDescriptor(m_iSocketDescriptor))
{
emit error(m_qSocket.error());
return;
}
bool bC = connect(&m_qSocket,SIGNAL(readyRead()),this,SLOT(readData()));
exec();
}
void Thread::run()
{
if (!m_qSocket.setSocketDescriptor(m_iSocketDescriptor))
{
emit error(m_qSocket.error());
return;
}
bool bC = connect(&m_qSocket,SIGNAL(readyRead()),this,SLOT(readData()));
exec();
}
To copy to clipboard, switch view to plain text mode
If I don't call "exec()" the application crash because can't recive signals...
The "exec()" method is called to let the Thread recive signals.
"bC" returns true, but "readData()" is never called.
The client is sending one single char and then calling flush to ensure that is sended without any wait.
Thanks,
Bookmarks