scan_stream

Function scan_stream 

Source
pub async fn scan_stream<S: Stream<Item = Result<Bytes, Error>>, T: TransportProtocol>(
    input_stream: S,
    connection: T,
    chunk_size: Option<usize>,
) -> IoResult
Expand description

Scans a stream for viruses

This function sends the provided stream to a ClamAV server for scanning.

§Arguments

  • input_stream: The stream 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