Class | UUID::Server |
In: |
lib/uuid.rb
|
Parent: | Object |
With UUID server you don‘t have to worry about multiple processes synchronizing over the state file, calling next_sequence when forking a process and other things you‘re probably not worried about (because statistically they‘re very unlikely to break your code).
But if you are worried about and thought to yourself, "what would a simple UUID server look like?", here‘s the answer. The protocol is dead simple: client sends a byte, server responds with a UUID. Can use TCP or domain sockets.
Returns UNIXServer or TCPServer from address. Returns argument if not a string, so can pass through (see listen).