Share via


UdpAnySourceMulticastClient.ReceiveBufferSize 屬性

定義

警告

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

取得或設定 Socket 的接收緩衝區大小 (以位元組為單位),用於這個 UdpAnySourceMulticastClient 執行個體上多點傳送的接收作業。

public:
 property int ReceiveBufferSize { 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 ReceiveBufferSize { 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.ReceiveBufferSize : int with get, set
Public Property ReceiveBufferSize As Integer

屬性值

傳回 Int32

接收緩衝區的大小,以位元組為單位。

屬性

例外狀況

指定的緩衝區大小小於 0。

尚未聯結多點傳送群組。

備註

屬性ReceiveBufferSize會取得或設定這個UdpAnySourceMulticastClient實例上用於多播接收作業之基礎Socket接收緩衝區的大小,以位元組為單位。 具體而言, ReceiveBufferSize 屬性會控制當封包送達時堆棧所使用的緩衝區大小,但應用程式尚未呼叫 BeginReceiveFromGroup 方法。 如果此緩衝區已填滿,且封包在應用程式呼叫 BeginReceiveFromGroupEndReceiveFromGroup 方法之前持續推出,則會卸除舊的封包。 應用程式永遠不會能夠接收舊的封包,而且會在呼叫 BeginReceiveFromGroup 方法時改為接收較新的封包。

Windows 上接收緩衝區的預設大小為 8,192 個字節。

適用於