ServicePoint.ConnectionLimit Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau menyetel jumlah maksimum koneksi yang diizinkan pada objek ini 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
Nilai Properti
Jumlah maksimum koneksi yang diperbolehkan pada objek ini ServicePoint .
Pengecualian
Batas koneksi sama dengan atau kurang dari 0.
Contoh
Contoh kode berikut menggunakan ConnectionLimit properti untuk memeriksa jumlah maksimum koneksi yang ServicePoint dapat dilakukan objek ke Pengidentifikasi Sumber Daya Seragam (URI) yang ditentukan.
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()))
Keterangan
Properti ConnectionLimit mengatur jumlah maksimum koneksi yang ServicePoint dapat dilakukan objek ke sumber daya Internet. Nilai ConnectionLimit properti diatur ke nilai ServicePointManager.DefaultConnectionLimit properti saat ServicePoint objek dibuat; perubahan DefaultConnectionLimit berikutnya tidak berpengaruh pada objek yang ada ServicePoint .
Berlaku untuk
Lihat juga
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk