AuthenticatedStream.IsServer Propriedade

Definição

Recebe um Boolean valor que indica se o lado local da ligação foi autenticado como servidor.

public:
 abstract property bool IsServer { bool get(); };
public abstract bool IsServer { get; }
member this.IsServer : bool
Public MustOverride ReadOnly Property IsServer As Boolean

Valor de Propriedade

true se o endpoint local foi autenticado como o lado servidor de uma ligação autenticada cliente-servidor; false se o endpoint local foi autenticado como cliente.

Exemplos

O exemplo seguinte demonstra a demonstração do valor desta propriedade.

// The following class displays the properties of an authenticatedStream.
public class AuthenticatedStreamReporter
{
    public static void DisplayProperties(AuthenticatedStream 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("IsServer: {0}", stream.IsServer);
    }
}
' The following class displays the properties of an AuthenticatedStream.
Public Class AuthenticatedStreamReporter
    Public Shared Sub DisplayProperties(stream As AuthenticatedStream)
        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("IsServer: {0}", stream.IsServer)
    End Sub
End Class

Observações

A maioria dos protocolos de segurança usados para autenticação cliente-servidor define comportamentos e requisitos específicos para fornecer credenciais para autenticação, consoante se é cliente ou servidor.

Aplica-se a