ReliableSessionBindingElement.MaxTransferWindowSize Property

Definition

Gets or sets the largest number of messages that can exist in either the send buffer or the receive buffer.

C#
public int MaxTransferWindowSize { get; set; }

Property Value

The largest number of messages that can be buffered. The minimum value is 1; the maximum value is 4096; and the default value is 32.

Exceptions

The value set is less than or equal to one or greater than 4096.

Remarks

The value of the MaxTransferWindowSize property can be set on both the sender and the receiver. This value is included in the binding policy of the WSDL, so if you use the ServiceModel Metadata Utility Tool (Svcutil.exe) to construct your client, it has the same value. Otherwise this value is whatever you set it to be on the client.

When this limit is reached on the sender, additional calls to send are blocked. When this limit is reached on the receiver, new messages that arrive on the underlying channel are not accepted.

A reliable session uses a windowing protocol to help improve network utilization. The amount of buffering required is directly derived from the size of the transmission window. When tuning this value, note that the optimal transmission window is related to the bandwidth and the latency in a straight-forward way. The ideal maximum window size is the bandwidth times the latency. Anything smaller yields less than 100% network utilization; anything larger is just wasted space.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)