C# 클래스 nClam.ClamClient

파일 보기 프로젝트 열기: tekmaven/nClam 1 사용 예제들

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
ExecuteClamCommandAsync ( string command, CancellationToken cancellationToken, Func additionalCommand = null ) : Task

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.

메소드 상세

ClamClient() 공개 메소드

A class to connect to a ClamAV server and request virus scans
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
리턴 System

GetVersionAsync() 공개 메소드

Gets the ClamAV server version
public GetVersionAsync ( ) : Task
리턴 Task

GetVersionAsync() 공개 메소드

Gets the ClamAV server version
public GetVersionAsync ( CancellationToken cancellationToken ) : Task
cancellationToken CancellationToken
리턴 Task

PingAsync() 공개 메소드

Executes a PING command on the ClamAV server.
public PingAsync ( ) : Task
리턴 Task

PingAsync() 공개 메소드

Executes a PING command on the ClamAV server.
public PingAsync ( CancellationToken cancellationToken ) : Task
cancellationToken CancellationToken
리턴 Task

ScanFileOnServerAsync() 공개 메소드

Scans a file/directory on the ClamAV Server.
public ScanFileOnServerAsync ( string filePath ) : Task
filePath string Path to the file/directory on the ClamAV server.
리턴 Task

ScanFileOnServerAsync() 공개 메소드

Scans a file/directory on the ClamAV Server.
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
리턴 Task

ScanFileOnServerMultithreadedAsync() 공개 메소드

Scans a file/directory on the ClamAV Server using multiple threads on the server.
public ScanFileOnServerMultithreadedAsync ( string filePath ) : Task
filePath string Path to the file/directory on the ClamAV server.
리턴 Task

ScanFileOnServerMultithreadedAsync() 공개 메소드

Scans a file/directory on the ClamAV Server using multiple threads on the server.
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
리턴 Task

SendAndScanFileAsync() 공개 메소드

Sends the data to the ClamAV server as a stream.
public SendAndScanFileAsync ( Stream sourceStream ) : Task
sourceStream Stream Stream containing the data to scan.
리턴 Task

SendAndScanFileAsync() 공개 메소드

Sends the data to the ClamAV server as a stream.
public SendAndScanFileAsync ( Stream sourceStream, CancellationToken cancellationToken ) : Task
sourceStream Stream Stream containing the data to scan.
cancellationToken CancellationToken cancellation token used for request
리턴 Task

SendAndScanFileAsync() 공개 메소드

Sends the data to the ClamAV server as a stream.
public SendAndScanFileAsync ( byte fileData ) : Task
fileData byte Byte array containing the data from a file.
리턴 Task

SendAndScanFileAsync() 공개 메소드

Sends the data to the ClamAV server as a stream.
public SendAndScanFileAsync ( byte fileData, CancellationToken cancellationToken ) : Task
fileData byte Byte array containing the data from a file.
cancellationToken CancellationToken cancellation token used for request
리턴 Task

SendAndScanFileAsync() 공개 메소드

Reads the file from the path and then sends it to the ClamAV server as a stream.
public SendAndScanFileAsync ( string filePath ) : Task
filePath string Path to the file/directory.
리턴 Task

SendAndScanFileAsync() 공개 메소드

Reads the file from the path and then sends it to the ClamAV server as a stream.
public SendAndScanFileAsync ( string filePath, CancellationToken cancellationToken ) : Task
filePath string Path to the file/directory.
cancellationToken CancellationToken cancellation token used for request
리턴 Task