UdpSingleSourceMulticastClient.SendBufferSize 属性

定义

注意

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

获取或设置 Socket 的发送缓冲区的大小(以字节为单位),该缓冲区用于此 UdpSingleSourceMulticastClient 实例上的多播发送操作。

public:
 property int SendBufferSize { int get(); void set(int value); };
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public int SendBufferSize { get; set; }
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
member this.SendBufferSize : int with get, set
Public Property SendBufferSize As Integer

属性值

返回 Int32

发送缓冲区的大小(以字节为单位)。

属性

例外

指定的缓冲区大小小于 0。

尚未联接多播组。

注解

SendBufferSize 属性获取或设置此UdpSingleSourceMulticastClient实例上用于多播发送操作的基础Socket的发送缓冲区的大小(以字节为单位)。

在 Mac OS X 上 SendBufferSize ,属性控制在对方法的其他调用 BeginSendToSource 开始失败之前,网络堆栈的等待发送缓冲区中可以有多少字节。 如果 Mac OS X 上的应用程序在短时间内发送大量 UDP 数据包,则可能需要关注此属性。

在 Windows 上, BeginSendToSource 如果发送缓冲区已满,则调用 方法需要更长的时间才能调用回调,具体取决于 属性的值 SendBufferSize 。 属性 SendBufferSize 仅控制在发送完成之前,用户的缓冲区是否一直锁定在物理内存中。

Windows 上发送缓冲区的默认大小为 8,192。

适用于