Method | Description | |
---|---|---|
ClamClient ( string server, int port = 3310 ) : System |
A class to connect to a ClamAV server and request virus scans
|
|
GetVersionAsync ( ) : Task |
Gets the ClamAV server version
|
|
GetVersionAsync ( CancellationToken cancellationToken ) : Task |
Gets the ClamAV server version
|
|
PingAsync ( ) : Task |
Executes a PING command on the ClamAV server.
|
|
PingAsync ( CancellationToken cancellationToken ) : Task |
Executes a PING command on the ClamAV server.
|
|
ScanFileOnServerAsync ( string filePath ) : Task |
Scans a file/directory on the ClamAV Server.
|
|
ScanFileOnServerAsync ( string filePath, CancellationToken cancellationToken ) : Task |
Scans a file/directory on the ClamAV Server.
|
|
ScanFileOnServerMultithreadedAsync ( string filePath ) : Task |
Scans a file/directory on the ClamAV Server using multiple threads on the server.
|
|
ScanFileOnServerMultithreadedAsync ( string filePath, CancellationToken cancellationToken ) : Task |
Scans a file/directory on the ClamAV Server using multiple threads on the server.
|
|
SendAndScanFileAsync ( Stream sourceStream ) : Task |
Sends the data to the ClamAV server as a stream.
|
|
SendAndScanFileAsync ( Stream sourceStream, CancellationToken cancellationToken ) : Task |
Sends the data to the ClamAV server as a stream.
|
|
SendAndScanFileAsync ( byte fileData ) : Task |
Sends the data to the ClamAV server as a stream.
|
|
SendAndScanFileAsync ( byte fileData, CancellationToken cancellationToken ) : Task |
Sends the data to the ClamAV server as a stream.
|
|
SendAndScanFileAsync ( string filePath ) : Task |
Reads the file from the path and then sends it to the ClamAV server as a stream.
|
|
SendAndScanFileAsync ( string filePath, CancellationToken cancellationToken ) : Task |
Reads the file from the path and then sends it to the ClamAV server as a stream.
|
Method | Description | |
---|---|---|
ExecuteClamCommandAsync ( string command, CancellationToken cancellationToken, Func |
Helper method which connects to the ClamAV Server, performs the command and returns the result.
|
|
SendStreamFileChunksAsync ( Stream sourceStream, Stream clamStream, CancellationToken cancellationToken ) : Task |
Helper method to send a byte array over the wire to the ClamAV server, split up in chunks.
|
public ClamClient ( string server, int port = 3310 ) : System | ||
server | string | Address to the ClamAV server |
port | int | Port which the ClamAV server is listening on |
return | System |
public GetVersionAsync ( CancellationToken cancellationToken ) : Task |
||
cancellationToken | CancellationToken | |
return | Task |
public PingAsync ( CancellationToken cancellationToken ) : Task |
||
cancellationToken | CancellationToken | |
return | Task |
public ScanFileOnServerAsync ( string filePath ) : Task |
||
filePath | string | Path to the file/directory on the ClamAV server. |
return | Task |
public ScanFileOnServerAsync ( string filePath, CancellationToken cancellationToken ) : Task |
||
filePath | string | Path to the file/directory on the ClamAV server. |
cancellationToken | CancellationToken | cancellation token used for request |
return | Task |
public ScanFileOnServerMultithreadedAsync ( string filePath ) : Task |
||
filePath | string | Path to the file/directory on the ClamAV server. |
return | Task |
public ScanFileOnServerMultithreadedAsync ( string filePath, CancellationToken cancellationToken ) : Task |
||
filePath | string | Path to the file/directory on the ClamAV server. |
cancellationToken | CancellationToken | cancellation token used for request |
return | Task |
public SendAndScanFileAsync ( Stream sourceStream ) : Task |
||
sourceStream | Stream | Stream containing the data to scan. |
return | Task |
public SendAndScanFileAsync ( Stream sourceStream, CancellationToken cancellationToken ) : Task |
||
sourceStream | Stream | Stream containing the data to scan. |
cancellationToken | CancellationToken | cancellation token used for request |
return | Task |
public SendAndScanFileAsync ( byte fileData ) : Task |
||
fileData | byte | Byte array containing the data from a file. |
return | Task |
public SendAndScanFileAsync ( byte fileData, CancellationToken cancellationToken ) : Task |
||
fileData | byte | Byte array containing the data from a file. |
cancellationToken | CancellationToken | cancellation token used for request |
return | Task |
public SendAndScanFileAsync ( string filePath ) : Task |
||
filePath | string | Path to the file/directory. |
return | Task |
public SendAndScanFileAsync ( string filePath, CancellationToken cancellationToken ) : Task |
||
filePath | string | Path to the file/directory. |
cancellationToken | CancellationToken | cancellation token used for request |
return | Task |