It's also very easy to implement a pipe based on QIODevice.
wysota, that's interesting. Reading briefly the QIODevice documentation it seems to me that such a pipe would be implemented sub-classing it, using a QByteArray to store writes and emitting readyReads, right?
The only thing I do not understand is if it's possible to automatically attach a QProcess to multiple QIODevice, so that when one has data ready, they are copied to every other connected device... In other words, I do not see why it should be more convenient to use a QIODevice to pipe.
Basically, yes.
You can implement a multiplexer device that reads from one source and writes to multiple destinations.The only thing I do not understand is if it's possible to automatically attach a QProcess to multiple QIODevice
It would be more convenient because you retain the QIODevice API so you can use the pipe with anything that can read from QIODevice or write to QIODevice. Bear in mind QProcess, QFile, QAbstractSocket are all QIODevice subclasses.In other words, I do not see why it should be more convenient to use a QIODevice to pipe.
Bookmarks