pub fn check_socket_path(socket: &Path) -> Result<()>
Fails when socket is too long to bind or connect to as a Unix socket.
socket
The error names the length and the limit, which the OS does not. Passes on platforms without the limit.