Function clamav_client::ping_socket

source ·
pub fn ping_socket<P: AsRef<Path>>(socket_path: P) -> IoResult
Expand description

Sends a ping request to ClamAV using a Unix socket connection

This function establishes a Unix socket connection to a ClamAV server at the specified socket_path and sends a ping request to it.

Example

let clamd_available = match clamav_client::ping_socket("/tmp/clamd.socket") {
    Ok(ping_response) => ping_response == b"PONG\0",
    Err(_) => false,
};