ServicePoint.ConnectionLimit Özellik

Tanım

Bu ServicePoint nesnede izin verilen en fazla bağlantı sayısını alır veya ayarlar.

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

Özellik Değeri

Bu ServicePoint nesnede izin verilen en fazla bağlantı sayısı.

Özel durumlar

Bağlantı sınırı 0'a eşittir veya 0'dan küçüktür.

Örnekler

Aşağıdaki kod örneği, nesnenin ConnectionLimit belirtilen Tekdüzen Kaynak Tanımlayıcısı'na (URI) gerçekleştirebileceği en fazla bağlantı ServicePoint sayısını denetlemek için özelliğini kullanır.

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

Açıklamalar

özelliği, ConnectionLimit nesnenin bir İnternet kaynağına gerçekleştirebileceği en fazla bağlantı ServicePoint sayısını ayarlar. Özelliğin ConnectionLimit değeri, nesne oluşturulduğunda özelliğin ServicePointManager.DefaultConnectionLimitServicePoint değerine ayarlanır; sonraki değişikliklerin DefaultConnectionLimit var olan ServicePoint nesneler üzerinde hiçbir etkisi olmaz.

Şunlara uygulanır

Ayrıca bkz.