ServicePoint.MaxIdleTime プロパティ
アセンブリ: System (system.dll 内)

Dim instance As ServicePoint Dim value As Integer value = instance.MaxIdleTime instance.MaxIdleTime = value
/** @property */ public int get_MaxIdleTime () /** @property */ public void set_MaxIdleTime (int value)
ServicePoint オブジェクトに関連付けられた接続が閉じられて別の接続で再利用されるまでにアイドル状態を持続できる時間 (ミリ秒単位)。


MaxIdleTime を Timeout.Infinite に設定して、ServicePoint オブジェクトに関連付けられた接続がタイムアウトしないように指定できます。
MaxIdleTime プロパティの既定値は、ServicePoint オブジェクトの作成時の ServicePointManager.MaxServicePointIdleTime プロパティの値です。後で MaxServicePointIdleTime プロパティを変更しても、既存の ServicePoint オブジェクトには影響を与えません。
ServicePoint に関連付けられた接続の上限である MaxIdleTime を超えた場合、その接続は開いたままになります。この状態は、アプリケーションが使用を試みると終了します。このとき、接続は .NET Framework によって閉じられ、リモート ホストへの新しい接続が作成されます。

MaxIdleTime プロパティを使用して、ServicePoint のアイドル時間を取得および設定するコード例を次に示します。
' Display the date and time that the ServicePoint was last ' connected to a host. Console.WriteLine(("IdleSince = " + sp.IdleSince.ToString())) ' Display the maximum length of time that the ServicePoint instance ' is allowed to maintain an idle connection to an Internet ' resource before it is recycled for use in another connection. Console.WriteLine(("MaxIdleTime = " + sp.MaxIdleTime.ToString()))
// Display the date and time that the ServicePoint was last // connected to a host. Console.WriteLine ("IdleSince = " + sp.IdleSince.ToString ()); // Display the maximum length of time that the ServicePoint instance // is allowed to maintain an idle connection to an Internet // resource before it is recycled for use in another connection. Console.WriteLine ("MaxIdleTime = " + sp.MaxIdleTime);
// Display the date and time that the ServicePoint was last // connected to a host. Console::WriteLine( "IdleSince = {0}", sp->IdleSince ); // Display the maximum length of time that the ServicePoint instance // is allowed to maintain an idle connection to an Internet // resource before it is recycled for use in another connection. Console::WriteLine( "MaxIdleTime = {0}", sp->MaxIdleTime );
// Display the date and time that the ServicePoint was last // connected to a host. Console.WriteLine(("IdleSince = " + sp.get_IdleSince().ToString())); // Display the maximum length of time that the ServicePoint instance // is allowed to maintain an idle connection to an Internet // resource before it is recycled for use in another connection. Console.WriteLine(("MaxIdleTime = " + sp.get_MaxIdleTime()));

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からServicePoint.MaxIdleTime プロパティを検索する場合は、下記のリンクをクリックしてください。

- ServicePoint.MaxIdleTime プロパティのページへのリンク