Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
5.12.3
-
None
Description
I'm using QLocalServer to make IPC between my apps. From client/server logic there is a valid message for both of them. In case of an incorrect message received - assertation happens.
For example (attached below), on every connection made, the server sends "server" string to the clients. When a client connects to the server - it sends "client" string. So, the server expects only "client" to be received and vice versa:
void Server::onReadRead() { // for example QString message; socketDataStream.setDevice(qobject_cast<QLocalSocket*>(sender()) socketDataStream >> message; Q_ASSERT(message == "client"); }
In the attached example, the message sent after the socket connection.
On Windows, this assertation triggered every time when the client connects. On Unix, no triggers, as for QTcpSocket will be used instead.
Is this a bug form a named pine perspective or there is no possibility to read/write simultaneously when pipe used?
The code from Qt should make this possible.
Please check the attached example, run the server first.
Attachments
Issue Links
- duplicates
-
QTBUG-61097 Issue with operator<<(QDataStream &out, const QByteArray &ba) with QLocalSocket on Windows
- Closed