NetTcpBinding.MaxBufferPoolSize 属性

定义

获取或设置缓冲池允许的最大大小(以字节为单位),该缓冲池用于存储由绑定处理的 TCP 消息。Gets or sets the maximum size, in bytes, allowed for a buffer pool that stores TCP messages processed by the binding.

public:
 property long MaxBufferPoolSize { long get(); void set(long value); };
public long MaxBufferPoolSize { get; set; }
member this.MaxBufferPoolSize : int64 with get, set
Public Property MaxBufferPoolSize As Long

属性值

缓冲池允许的最大大小,该缓冲池用于存储由绑定处理的 TCP 消息。The maximum size allowed for a buffer pool that stores TCP messages processed by the binding. 默认值为524288字节。The default value is 524,288 bytes.

示例

此示例演示如何获取 MaxBufferPoolSize 值。This example shows how to get the MaxBufferPoolSize value.

long maxBufferPoolsize = binding.MaxBufferPoolSize;

注解

如果接收的数据超过了可进行缓冲处理的数据,则超出缓冲区大小的数据将保留在基础套接字中,直到缓冲区中具有可用于存储剩余数据的空间为止。If you receive more data than you can buffer, the data that exceeds the buffer size remains on the underlying socket until your buffer has room for the rest of the data.

适用于