# Class TClamSend

Description | Hierarchy | Fields | Methods | Properties

## Unit

clamsend

## Declaration

`type TClamSend = class(TSynaClient)`

## Description

Implementation of ClamAV-daemon client protocol

By this class you can scan any your data by ClamAV opensource antivirus.

This class can connect to ClamD by TCP channel, send your data to ClamD and read result.

## Hierarchy

- TObject
- TSynaClient
- TClamSend

## Overview

### Methods

| `constructor Create;`
| `destructor Destroy; override;`
| `function DoCommand(const Value: AnsiString): AnsiString; virtual;`
| `function GetVersion: AnsiString; virtual;`
| `function ScanStrings(const Value: TStrings): AnsiString; virtual;`
| `function ScanStream(const Value: TStream): AnsiString; virtual;`
| `function ScanStrings2(const Value: TStrings): AnsiString; virtual;`
| `function ScanStream2(const Value: TStream): AnsiString; virtual;`

### Properties

| `property Sock: TTCPBlockSocket read FSock;`
| `property DSock: TTCPBlockSocket read FDSock;`
| `property Session: boolean read FSession write FSession;`

## Description

### Methods

| `constructor Create;`

| `destructor Destroy; override;`

| `function DoCommand(const Value: AnsiString): AnsiString; virtual;`

Call any command to ClamD. Used internally by other methods.

| `function GetVersion: AnsiString; virtual;`

Return ClamAV version and version of loaded databases.

| `function ScanStrings(const Value: TStrings): AnsiString; virtual;`

Scan content of TStrings.

| `function ScanStream(const Value: TStream): AnsiString; virtual;`

Scan content of TStream.

| `function ScanStrings2(const Value: TStrings): AnsiString; virtual;`

Scan content of TStrings by new 0.95 API.

| `function ScanStream2(const Value: TStream): AnsiString; virtual;`

Scan content of TStream by new 0.95 API.

### Properties

| `property Sock: TTCPBlockSocket read FSock;`

Socket object used for TCP/IP operation. Good for seting OnStatus hook, etc.

| `property DSock: TTCPBlockSocket read FDSock;`

Socket object used for TCP data transfer operation. Good for seting OnStatus hook, etc.

| `property Session: boolean read FSession write FSession;`

Can turn-on session mode of communication with ClamD. Default is `False`, because ClamAV developers design their TCP code very badly and session mode is broken now (CVS-20051031). Maybe ClamAV developers fix their bugs and this mode will be possible in future.

Generated by PasDoc 0.9.0 on 2012-04-23 21:38:50