Export (0) Print
Expand All

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)

public:
property DateTime IdleSince {
	DateTime get ();
}
/** @property */
public DateTime get_IdleSince ()

public function get IdleSince () : DateTime

Property Value

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 = {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

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

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft