UdpSingleSourceMulticastClient.ReceiveBufferSize 屬性

定義

警告

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

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

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會取得或設定這個UdpSingleSourceMulticastClient實例上用於多播接收作業之基礎Socket接收緩衝區的大小,以位元組為單位。 具體而言, ReceiveBufferSize 屬性會控制當封包送達時堆棧所使用的緩衝區大小,但應用程式尚未呼叫 BeginReceiveFromSource 方法。 如果此緩衝區已填滿,而且封包會在應用程式呼叫 BeginReceiveFromSourceEndReceiveFromSource 方法之前持續傳入,則會捨棄舊的封包。 應用程式永遠無法接收舊的封包,而是會在呼叫 BeginReceiveFromSource 方法時接收較新的封包。

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

適用於