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 開始失敗。 如果應用程式在短時間內傳送大量 UDP 封包,則 Mac OS X 上的應用程式可能需要擔心此屬性。

在 Windows 上,呼叫 BeginSendToSource 方法需要較長的時間才能呼叫回呼,視傳送緩衝區已滿時的屬性值 SendBufferSize 而定。 屬性 SendBufferSize 只會控制用戶緩衝區是否在實體記憶體中保持鎖定狀態,直到傳送完成為止。

Windows 上傳送緩衝區的預設大小為 8,192。

適用於