ServicePoint.ConnectionLimit Propriedade
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém ou define o número máximo de conexões permitidas neste objeto 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
Valor da propriedade
O número máximo de conexões permitidas neste objeto ServicePoint.
Exceções
O limite de conexão é igual ou menor do que 0.
Exemplos
O exemplo de código a seguir usa a ConnectionLimit propriedade para verificar o número máximo de conexões que o ServicePoint objeto pode fazer com o URI (Uniform Resource Identifier) especificado.
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()))
Comentários
A ConnectionLimit propriedade define o número máximo de conexões que o ServicePoint objeto pode fazer a um recurso da Internet. O valor da ConnectionLimit propriedade é definido como o valor da ServicePointManager.DefaultConnectionLimit propriedade quando o ServicePoint objeto é criado; alterações subsequentes para DefaultConnectionLimit não ter efeito sobre objetos existentes ServicePoint .
Aplica-se a
Confira também
Comentários
https://aka.ms/ContentUserFeedback.
Em breve: Ao longo de 2024, eliminaremos os problemas do GitHub como o mecanismo de comentários para conteúdo e o substituiremos por um novo sistema de comentários. Para obter mais informações, consulteEnviar e exibir comentários de