Answer the question
In order to leave comments, you need to log in
Why doesn't the signal fire in Qt?
In the stream, I create a socket and make a connection:
mTcpSocket = new QTcpSocket;
mTcpSocket->setSocketDescriptor(mSockD);
connect(mTcpSocket, &QTcpSocket::readyRead, this, &Listener::SlotMessageAccepted);
QByteArray Block;
_sock->waitForReadyRead();
while (_sock->bytesAvailable() > 0)
Block.append(_sock->readAll());
Answer the question
In order to leave comments, you need to log in
I figured out what the problem is. The problem is that all incoming data goes to the socket, which is in the main thread, and nothing just reaches the socket in the other thread.
Tell me, is it possible to somehow tell sockets to either only read or only send data?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question