pub fn try_connect_sync(socket_path: &Path) -> Result<bool>Expand description
Synchronously probe whether the daemon socket is reachable.
On Unix: attempts std::os::unix::net::UnixStream::connect.
On Windows: checks whether the named-pipe path exists
(sufficient for readiness detection without async machinery).
Returns Ok(true) if the socket is reachable, Ok(false) if not.
§Errors
Only returns Err for unexpected I/O errors. ConnectionRefused,
NotFound, and PermissionDenied are all surfaced as Ok(false) —
any of them mean the daemon is not reachable from this caller (no
listener, no socket file, or kernel/sandbox blocking the connect).