ServicePoint.IdleSince Propiedad

Definición

Obtiene la fecha y la hora en que el objeto ServicePoint se conectó al host por última vez.

public:
 property DateTime IdleSince { DateTime get(); };
public DateTime IdleSince { get; }
member this.IdleSince : DateTime
Public ReadOnly Property IdleSince As DateTime

Valor de propiedad

Un objeto DateTime que contiene la fecha y la hora en que el objeto ServicePoint se conectó por última vez.

Ejemplos

En el ejemplo de código siguiente se usa la IdleSince propiedad para establecer y recuperar la fecha y hora en que el ServicePoint objeto se conectó por última vez a un 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.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 = " + 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()))

Comentarios

La IdleSince propiedad registra la última fecha y hora en la que se desconectó un punto de servicio de un host. Cuando la diferencia entre la hora actual y IdleSince supera el valor de MaxIdleTime, el ServicePoint objeto está disponible para reciclar a otra conexión.

Se aplica a