다음을 통해 공유


ServicePointManager 클래스

정의

주의

WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.

ServicePoint 개체의 컬렉션을 관리합니다.

public ref class ServicePointManager
public class ServicePointManager
[System.Obsolete("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.", DiagnosticId="SYSLIB0014", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public class ServicePointManager
type ServicePointManager = class
[<System.Obsolete("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.", DiagnosticId="SYSLIB0014", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type ServicePointManager = class
Public Class ServicePointManager
상속
ServicePointManager
특성

예제

다음 코드 예제에서는 URI www.contoso.com연결에 대 한 ServicePoint 개체를 만듭니다.

Uri^ myUri = gcnew Uri( "http://www.contoso.com/" );
ServicePoint^ mySP = ServicePointManager::FindServicePoint( myUri );
Uri myUri = new Uri("http://www.contoso.com/");

ServicePoint mySP = ServicePointManager.FindServicePoint(myUri);
Dim myUri As New Uri("http://www.contoso.com/")
       
Dim mySP As ServicePoint = ServicePointManager.FindServicePoint(myUri)

설명

ServicePointManager ServicePoint 클래스의 인스턴스를 만들고 유지 관리하고 삭제하는 데 사용되는 정적 클래스입니다.

애플리케이션이 ServicePointManager 개체를 통해 인터넷 리소스 URI(Uniform Resource Identifier)에 대한 연결을 요청하면 ServicePointManager 호스트에 대한 연결 정보와 URI로 식별되는 구성표가 포함된 ServicePoint 개체를 반환합니다. 해당 호스트 및 구성표에 대한 기존 ServicePoint 개체가 있는 경우 ServicePointManager 개체는 기존 ServicePoint 개체를 반환합니다. 그렇지 않으면 ServicePointManager 개체가 새 ServicePoint 개체를 만듭니다.

.NET Framework 4.6에는 연결에 대한 안전하지 않은 암호 및 해시 알고리즘을 차단하는 새로운 보안 기능이 포함되어 있습니다. HttpClient, HttpWebRequest, FtpWebRequest, SmtpClient, SslStream등과 같은 API를 통해 TLS/SSL을 사용하고 .NET Framework 4.6을 대상으로 하는 애플리케이션은 기본적으로 보다 안전한 동작을 가져옵니다.

개발자는 기존 SSL3 서비스 또는 TLS(RC4 서비스)와의 상호 운용성을 유지하기 위해 이 동작을 옵트아웃(opt out)할 수 있습니다. 이 문서에서는 새 동작을 사용하지 않도록 코드를 수정하는 방법을 설명합니다.

중요하다

새 개발에는 ServicePointManager 클래스를 사용하지 않는 것이 좋습니다. 대신 System.Net.Http.HttpClient 클래스를 사용합니다.

필드

DefaultNonPersistentConnectionLimit
사용되지 않음.

HTTP/1.0 이상 서버에 연결된 ServicePoint 개체에 허용되는 비영구 연결(4)의 기본 수입니다. 이 필드는 상수이지만 .NET Framework 2.0에서는 더 이상 사용되지 않습니다.

DefaultPersistentConnectionLimit
사용되지 않음.

HTTP/1.1 이상 서버에 연결된 ServicePoint 개체에 허용되는 기본 영구 연결 수(2)입니다. 이 필드는 상수이며 DefaultConnectionLimit 속성 값이 직접 또는 구성을 통해 설정되지 않은 경우 DefaultConnectionLimit 속성을 초기화하는 데 사용됩니다.

속성

CertificatePolicy
사용되지 않음.

서버 인증서에 대한 정책을 가져오거나 설정합니다.

CheckCertificateRevocationList
사용되지 않음.

인증서가 인증 기관 해지 목록에 대해 검사되는지 여부를 나타내는 Boolean 값을 가져오거나 설정합니다.

DefaultConnectionLimit
사용되지 않음.

ServicePoint 개체에서 허용하는 최대 동시 연결 수를 가져오거나 설정합니다.

DnsRefreshTimeout
사용되지 않음.

DNS(Domain Name Service) 확인이 유효한 것으로 간주되는 기간을 나타내는 값을 가져오거나 설정합니다.

EnableDnsRoundRobin
사용되지 않음.

DNS(Domain Name Service) 확인이 해당 IP(인터넷 프로토콜) 주소 간에 회전하는지 여부를 나타내는 값을 가져오거나 설정합니다.

EncryptionPolicy
사용되지 않음.

ServicePointManager 인스턴스의 EncryptionPolicy 가져옵니다.

Expect100Continue
사용되지 않음.

100-Continue 동작이 사용되는지 여부를 결정하는 Boolean 값을 가져오거나 설정합니다.

MaxServicePointIdleTime
사용되지 않음.

ServicePoint 개체의 최대 유휴 시간을 가져오거나 설정합니다.

MaxServicePoints
사용되지 않음.

언제든지 유지할 ServicePoint 개체의 최대 수를 가져오거나 설정합니다.

ReusePort
사용되지 않음.

이 속성 값을 true 설정하면 HttpWebRequest의 모든 아웃바운드 TCP 연결이 소켓에 SO_REUSE_UNICASTPORT 네이티브 소켓 옵션을 사용합니다. 이로 인해 기본 나가는 포트가 공유됩니다. 이는 짧은 시간 안에 많은 수의 나가는 연결이 이루어지고 앱이 포트가 부족할 위험이 있는 시나리오에 유용합니다.

SecurityProtocol
사용되지 않음.

ServicePointManager 개체에서 관리하는 ServicePoint 개체에서 사용하는 보안 프로토콜을 가져오거나 설정합니다.

ServerCertificateValidationCallback
사용되지 않음.

서버 인증서의 유효성을 검사하는 콜백을 가져오거나 설정합니다.

UseNagleAlgorithm
사용되지 않음.

Nagle 알고리즘이 이 ServicePointManager 개체에서 관리하는 서비스 지점에서 사용되는지 여부를 결정합니다.

메서드

Equals(Object)
사용되지 않음.

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
FindServicePoint(String, IWebProxy)
사용되지 않음.

기존 ServicePoint 개체를 찾거나 새 ServicePoint 개체를 만들어 지정된 URI(Uniform Resource Identifier)와의 통신을 관리합니다.

FindServicePoint(Uri)
사용되지 않음.

기존 ServicePoint 개체를 찾거나 새 ServicePoint 개체를 만들어 지정된 Uri 개체와의 통신을 관리합니다.

FindServicePoint(Uri, IWebProxy)
사용되지 않음.

기존 ServicePoint 개체를 찾거나 새 ServicePoint 개체를 만들어 지정된 Uri 개체와의 통신을 관리합니다.

GetHashCode()
사용되지 않음.

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetType()
사용되지 않음.

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()
사용되지 않음.

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
SetTcpKeepAlive(Boolean, Int32, Int32)
사용되지 않음.

TCP 연결에서 연결 유지 옵션을 사용하거나 사용하지 않도록 설정합니다.

ToString()
사용되지 않음.

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보