Are there predefined Emacs functions to check if a file is a Unix socket?
The best I could come up with is the following code.
(defun socket-p (fname)
"Return non-nil if FNAME is a Unix Socket, nil otherwise."
(eq (string-to-char (nth 8 (file-attributes fname))) ?s))
Is there something else in the built-in Emacs or its core libraries?