ServicePoint.IdleSince Propriété

Définition

Obtient la date et l'heure de la dernière connexion de l'objet ServicePoint à un hôte.

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

Valeur de propriété

Objet DateTime contenant la date et l'heure de la dernière connexion de l'objet ServicePoint.

Exemples

L’exemple de code suivant utilise la IdleSince propriété pour définir et récupérer la date et l’heure de la dernière connexion de l’objet ServicePoint à un hôte.

// 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()))

Remarques

La IdleSince propriété enregistre la date et l’heure de la dernière déconnexion d’un point de service d’un hôte. Lorsque la différence entre l’heure actuelle et IdleSince dépasse la valeur de MaxIdleTime, l’objet ServicePoint peut être recyclé dans une autre connexion.

S’applique à