scan_buffer

Function scan_buffer 

Source
pub fn scan_buffer<T: TransportProtocol>(
    buffer: &[u8],
    connection: T,
    chunk_size: Option<usize>,
) -> IoResult
Expand description

Scans a data buffer for viruses

This function streams the provided buffer data to a ClamAV server for scanning.

§Arguments

  • buffer: The data to be scanned
  • connection: The connection type to use - either TCP or a Unix socket connection
  • chunk_size: An optional chunk size for reading data. If None, a default chunk size is used

§Returns

An IoResult containing the server’s response as a vector of bytes