[Qt-interest] Help with socketpair and QFiles

Stephen Collyer scollyer at netspinner.co.uk
Fri Apr 9 12:44:52 CEST 2010


On 8 April 2010 20:37, David Boosalis <david.boosalis at gmail.com> wrote:

> Some may find this laughable, some pathetic, but I'd like to use a
> SocketPair to communicate with from one QThread to another. I tried
> QLocalSockets but it fails with a core dump once I get the volume of data
> pumped up. This is on Linux,  any advise appreciated.
>
>
If you merely need to communicate between two threads in the same process,
it's trivial to knock up a thread-safe message passing mechanism using
QQueue, QMutex, etc and I'd suggest that you do that.

On the other hand, you can use QTcpServer/QTcpSocket to make a local TCP
based comms implementation for process-process comms, if QLocalSocket is
failing you for some reason.

-- 
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100409/ddfe91bc/attachment.html 


More information about the Qt-interest-old mailing list