ServicePoint.IdleSince Eigenschaft

Definition

Ruft das Datum und die Uhrzeit der letzten Verbindung des ServicePoint-Objekts mit einem Host ab.

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

Eigenschaftswert

Ein DateTime-Objekt, das Datum und Uhrzeit der letzten Verbindung des ServicePoint-Objekts enthält.

Beispiele

Im folgenden Codebeispiel wird die IdleSince -Eigenschaft verwendet, um das Datum und die Uhrzeit festzulegen und abzurufen, zu der das ServicePoint Objekt zuletzt mit einem Host verbunden wurde.

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

Hinweise

Die IdleSince -Eigenschaft zeichnet das Datum und die Uhrzeit des letzten Zeitpunkts auf, zu dem ein Dienstpunkt von einem Host getrennt wurde. Wenn der Unterschied zwischen der aktuellen Zeit und IdleSince dem Wert von MaxIdleTimeüberschreitet, steht das Objekt für das ServicePoint Recycling in einer anderen Verbindung zur Verfügung.

Gilt für: