method

socket?

ruby latest stable - Class: File
socket?(p1)
public

Returns true if the named file is a socket.

file_name can be an IO object.