ServicePoint.ConnectionLimit Свойство
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Возвращает или задает максимальное число подключений, разрешенное для этого объекта 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
Значение свойства
Максимальное число подключений, разрешенное для этого объекта ServicePoint.
Исключения
Предел подключения равен 0 или меньше 0.
Примеры
В следующем примере кода используется ConnectionLimit свойство, чтобы проверить максимальное число подключений, ServicePoint может сделать для указанного универсального кода ресурса (URI).
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()))
Комментарии
Свойство ConnectionLimit задает максимальное количество подключений, которое ServicePoint объект может установить с интернет-ресурсом. ConnectionLimit Значение свойства устанавливается в значение ServicePointManager.DefaultConnectionLimit свойства при ServicePoint создании объекта; последующие изменения DefaultConnectionLimit не оказывают влияния на существующие ServicePoint объекты.
Применяется к
См. также раздел
Обратная связь
https://aka.ms/ContentUserFeedback.
Ожидается в ближайшее время: в течение 2024 года мы постепенно откажемся от GitHub Issues как механизма обратной связи для контента и заменим его новой системой обратной связи. Дополнительные сведения см. в разделеОтправить и просмотреть отзыв по