Important: Please read the Qt Code of Conduct -

Fastest IPC method

  • Hello,
    What is the fastest Qt IPC method that supported on both Windows and Linux?
    I need to communicate between Qt GUI application and main C++ program on both OS.

  • IMHO is the fastest IPC via shared memory which works on both platforms.
    But it really depends what your use case is.
    What kind of data are transferred?

  • Shared memory is just sharing state, but does not provide signaling. Often you need both: you need to share state and notify the other party(s) that that state has changed.

  • QLocalSocket and QLocalServer are simple wrappers around Windows and Linux versions of local sockets. Local sockets do not inherrit any overhead of tcp sockets. They are very easy to use, you just have to decide which one is going to be the server and which one the client

  • Hi Andre,
    this are assumption based on your knowledge and your experience.
    Of course totally correct.
    As I mentioned it really depends how the communication happens.
    He didn't mentioned anything about signaling.
    And since he is so eager on the word fastest without mentioning any details I gave him this answer.

    Shared memory is the fastest IPC for simple communication.

  • I'd also recommend QLocalServer/Socket duo.

Log in to reply