NegotiateStream.IsServer 속성

정의

NegotiateStream에서 사용하는 연결의 로컬측이 서버로 인증되었는지 여부를 나타내는 Boolean 값을 가져옵니다.

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 DisplayAuthenticationProperties( NegotiateStream^ stream )
{
   Console::WriteLine( L"IsAuthenticated: {0}", stream->IsAuthenticated );
   Console::WriteLine( L"IsMutuallyAuthenticated: {0}", stream->IsMutuallyAuthenticated );
   Console::WriteLine( L"IsEncrypted: {0}", stream->IsEncrypted );
   Console::WriteLine( L"IsSigned: {0}", stream->IsSigned );
   Console::WriteLine( L"ImpersonationLevel: {0}", stream->ImpersonationLevel );
   Console::WriteLine( L"IsServer: {0}", stream->IsServer );
}


 static void DisplayAuthenticationProperties(NegotiateStream stream)
{
     Console.WriteLine("IsAuthenticated: {0}", stream.IsAuthenticated);
    Console.WriteLine("IsMutuallyAuthenticated: {0}", stream.IsMutuallyAuthenticated);
    Console.WriteLine("IsEncrypted: {0}", stream.IsEncrypted);
    Console.WriteLine("IsSigned: {0}", stream.IsSigned);
    Console.WriteLine("ImpersonationLevel: {0}", stream.ImpersonationLevel);
    Console.WriteLine("IsServer: {0}", stream.IsServer);
}

설명

인증에 실패했거나 발생하지 않은 경우 이 속성은 를 반환합니다 false.

서버로 인증하려면 또는 BeginAuthenticateAsServer 메서드를 AuthenticateAsServer 호출합니다.

적용 대상