SslStream.IsServer 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
public:
virtual property bool IsServer { bool get(); };
public override bool IsServer { get; }
member this.IsServer : bool
Public Overrides ReadOnly Property IsServer As Boolean
속성 값
로컬 엔드포인트가 인증된 연결의 서버 측으로 인증되면 true
이고, 그렇지 않으면 false
입니다.
예제
다음 코드 예제에서는이 속성의 값을 표시 합니다.
static void DisplaySecurityServices(SslStream stream)
{
Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer);
Console.WriteLine("IsSigned: {0}", stream.IsSigned);
Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted);
Console.WriteLine("Is mutually authenticated: {0}", stream.IsMutuallyAuthenticated);
}
Private Shared Sub DisplaySecurityServices(stream As SslStream)
Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer)
Console.WriteLine("IsSigned: {0}", stream.IsSigned)
Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted)
Console.WriteLine("Is mutually authenticated: {0}", stream.IsMutuallyAuthenticated)
End Sub
설명
인증에 실패했거나 발생하지 않은 경우 이 속성은 를 반환합니다 false
.
서버로 인증하려면 또는 BeginAuthenticateAsServer 메서드를 AuthenticateAsServer 호출합니다.