Results 1 to 6 of 6

Thread: Inter-Process Communication : Message Queue ?

  1. #1
    Join Date
    Mar 2011
    Posts
    20
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Inter-Process Communication : Message Queue ?

    hi guys,
    i want to figure out about
    How to use IPC: message queue in Qt
    Does there have any way to do this ?
    i'm using Qt 4.7 , and find the page Inter-Process Communication in Qt
    there not mention about message queue ,
    does that mean current Qt 4.7 not support Message queue to communicate
    between Qt process and non-Qt process ?
    or there is another way to do ?

    any help would be appreciated ,
    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Inter-Process Communication : Message Queue ?

    there not mention about message queue ,
    does that mean current Qt 4.7 not support Message queue to communicate
    between Qt process and non-Qt process ?
    That is a higher lever construct.
    Qt offers you the building blocks to implement such a thing.
    You can send and receive messages across processes in any of the ways in the link you posted.
    And you have the QEventLoop.
    If you wish to use a message loop construct, then you will have to implement it.
    You can for example use QEventLoop to handle your messages.
    One way would be to pack your incoming messages in to QEvent, and place them in to an event loop of a working thread.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. The following user says thank you to high_flyer for this useful post:

    lllturtle (25th May 2011)

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Inter-Process Communication : Message Queue ?

    If you want to use message queues, use the native API (such as msgctl, msgget, msgrcv and msgsnd on Linux) as the concept is not portable across platforms anyway.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    lllturtle (25th May 2011)

  6. #4
    Join Date
    Mar 2011
    Posts
    20
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Inter-Process Communication : Message Queue ?

    finally i use the native API to solve this problem , and it work properly till now
    the only thing is i can't compiler under windows now
    thanks your reply ~

  7. #5
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Inter-Process Communication : Message Queue ?

    Then implement the windows API equivalent to the code that runs for you on other systems.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  8. #6
    Join Date
    Aug 2011
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Inter-Process Communication : Message Queue ?

    You might want to have a look at ZeroMQ and the existing Qt binding nzmqt. ZeroMQ is a portable and very efficient message queue. It can bee used for IPC or network communication and is LGPL'ed.

Similar Threads

  1. Replies: 9
    Last Post: 7th May 2011, 00:36
  2. need help on inter Qthread communication
    By Ratheendrans in forum Qt Programming
    Replies: 2
    Last Post: 12th October 2010, 06:39
  3. Inter App Communication
    By baray98 in forum General Programming
    Replies: 13
    Last Post: 13th February 2010, 19:16
  4. inter widget communication
    By venk2ksubbu in forum Qt Tools
    Replies: 2
    Last Post: 14th November 2007, 05:57
  5. Inter Process Communication
    By yellowmat in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2006, 12:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.