如何在Window中更改Clamd服务的文件大小?

时间:2016-09-07 13:19:48

标签: nclam

默认限制:文件大小限制设置为26214400字节。 如果我扫描文件大小> 25mb,会发生错误。

The maximum stream size of 26214400 bytes has been exceeded.

我尝试改变:

 public ClamClient(string server, int port)
        {
            MaxChunkSize = 131072; //128k
            MaxStreamSize = 209715200; //200mb ,- 26214400; //25mb
            Server = server;
            Port = port;
        }

但扫描文件时出现错误:

Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.

如何在Window中更改Clamd服务的文件大小?

谢谢大家。

1 个答案:

答案 0 :(得分:4)

您需要更改nclam config(“clamd.conf”):

StreamMaxLength 50M

您还必须使用更高的MaxStreamSize更改ClamClient实例:

var client = new ClamClient("localhost", 3310)
{
     MaxStreamSize = 52428800
};