How do I know my Q-KEY is unique ?

Jon W{tte d88-jwa at nada.kth.se
Sat Sep 23 03:43:21 AEST 1989


Wow, here's an almost straightforward, though still-advanced question !

I am currently considering using message queues for a game I'm writing.
The problem is: when I create a message queue, I pass a (hopefully)
unique 32-bit key. How do I make SURE this key is unique ? (I need to
compile the key into a server as well as a client...)

I suppose I could use a "setup file" with a precompiled path, and have the
server establish an unused key when it first is started, but that idea
doesn't appeal to me that much, I'm afraid...

Is there anywhere where you register your 32-bit key to ensure that it
is unique and noone else uses it ? Or do I use one (presently I'm using
8273460...) and hope noone else uses the same ?

Apple Computer has a scheme where you register "file creator types"
(also 32-bit longs) to ensure that no two applications get the same
icons or conflict with each other's documents.

h+ at nada.kth.se
-- 
Don't hate yourself in the morning -- sleep till noon.



More information about the Comp.unix.wizards mailing list