ServicePoint.ConnectionLimit Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit le nombre maximal de connexions autorisé sur cet objet ServicePoint.
public:
property int ConnectionLimit { int get(); void set(int value); };
public int ConnectionLimit { get; set; }
member this.ConnectionLimit : int with get, set
Public Property ConnectionLimit As Integer
Valeur de propriété
Nombre maximal de connexions autorisé sur cet objet ServicePoint.
Exceptions
La limite de connexions est égale ou inférieure à 0.
Exemples
L’exemple de code suivant utilise la ConnectionLimit propriété pour vérifier le nombre maximal de connexions que l’objet ServicePoint peut établir avec l’URI spécifié.
Console::WriteLine( "ConnectionName = {0}", sp->ConnectionName );
// Display the maximum number of connections allowed on this
// ServicePoint instance.
Console::WriteLine( "ConnectionLimit = {0}", sp->ConnectionLimit );
// Display the number of connections associated with this
// ServicePoint instance.
Console::WriteLine( "CurrentConnections = {0}", sp->CurrentConnections );
Console.WriteLine("ConnectionName = " + sp.ConnectionName);
// Display the maximum number of connections allowed on this
// ServicePoint instance.
Console.WriteLine("ConnectionLimit = " + sp.ConnectionLimit);
// Display the number of connections associated with this
// ServicePoint instance.
Console.WriteLine("CurrentConnections = " + sp.CurrentConnections);
Console.WriteLine(("ConnectionName = " + sp.ConnectionName))
' Display the maximum number of connections allowed on this
' ServicePoint instance.
Console.WriteLine(("ConnectionLimit = " + sp.ConnectionLimit.ToString()))
' Display the number of connections associated with this
' ServicePoint instance.
Console.WriteLine(("CurrentConnections = " + sp.CurrentConnections.ToString()))
Remarques
La ConnectionLimit propriété définit le nombre maximal de connexions que l’objet ServicePoint peut établir à une ressource Internet. La valeur de la ConnectionLimit propriété est définie sur la valeur de la propriété lors de la ServicePointManager.DefaultConnectionLimit création de l’objet ; les ServicePoint modifications suivantes n’ont DefaultConnectionLimit aucun effet sur les objets existants ServicePoint .
S’applique à
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour