Results 1 to 20 of 30

Thread: Limiting the number of instances of one application

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    52
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Limiting the number of instances of one application

    Did you also look at the QUdpSocket? (Qt Broadcast example)
    Maybe it would also work this way:
    1) Application is started.
    2) Application opens a Udp port that is known to all applications.
    3) The new app sends out a datagramm
    4) Now the app does listen for all responses from other running applications
    5) The new app does verify the number of responses and determines the total number of running instances
    6.1) If there are too many applications running, the new app terminates itself.
    6.2) If it is possible to start another instance, then the new app will close the Udp server socket and open a Udp client socket, listening for broadcast messages itself.

    This should really work on any platform.

  2. The following user says thank you to Mike for this useful post:

    fullmetalcoder (20th October 2006)

Similar Threads

  1. Replies: 3
    Last Post: 8th December 2006, 18:51

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
  •  
Qt is a trademark of The Qt Company.