Share via


ConnectionOrientedTransportBindingElement.MaxPendingAccepts 屬性

定義

取得或設定服務可使其等待接聽程式以處理服務之連入連線的通道最大數目。

public:
 property int MaxPendingAccepts { int get(); void set(int value); };
public int MaxPendingAccepts { get; set; }
member this.MaxPendingAccepts : int with get, set
Public Property MaxPendingAccepts As Integer

屬性值

服務可在接聽程式上等待的通道數上限。 預設值是 2 * 處理器數目。

例外狀況

這個值小於或等於零。

備註

這個屬性會限制伺服器可以在接聽程式上等待的通道數量。 MaxPendingAccepts 太低時,會有一小段時間間隔讓所有等待中的通道開始提供連接服務,但不會有任何新的通道開始接聽。 在這段時間間隔內出現的連接都會失敗,因為伺服器上沒有任何要等待的連接。 這個屬性可以藉由將 MaxPendingConnections 屬性設為較大數目的方式進行設定。

適用於