Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ServicePoint.IdleSince Property

Gets the date and time that the ServicePoint object was last connected to a host.

Namespace:  System.Net
Assembly:  System (in System.dll)
'Declaration
Public ReadOnly Property IdleSince As DateTime
'Usage
Dim instance As ServicePoint 
Dim value As DateTime 

value = instance.IdleSince

Property Value

Type: System.DateTime
A DateTime object that contains the date and time at which the ServicePoint object was last connected.

The IdleSince property records the last date and time at which a service point was disconnected from a host. When the difference between the current time and IdleSince exceeds the value of MaxIdleTime, the ServicePoint object is available for recycling to another connection.

The following code example uses the IdleSince property to set and retrieve the date and time that the ServicePoint object was last connected to a host.

' 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(S"IdleSince = {0}", __box(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(S"MaxIdleTime = {0}", __box(sp->MaxIdleTime));

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.