Fix typo.
Use UID in dir name to avoid possible access denial on shared /tmp.
Fix volatile use in __atomic_load_n() redefine.
Simplify UNUSED() macro.

It already requires semicolon and because of void cast it can't be used
in expression so there's no need for the do {} while(0) wrapper.
Add command line options.
Add read timeout.
Specify socket type explicitly.