Function S_ISSOCK (m:integer) : boolean;
S_ISSOCK checks the file mode m to see whether the file is a socket. If so it returns True.
FStat, S_ISLNK, S_ISREG, S_ISDIR, S_ISCHR, S_ISBLK, S_ISFIFO
For an example, see ISLNK.