SslStream.CanWrite Propriedade

Definição

Obtém um valor Boolean que indica se o fluxo subjacente é gravável.Gets a Boolean value that indicates whether the underlying stream is writable.

public:
 virtual property bool CanWrite { bool get(); };
public override bool CanWrite { get; }
member this.CanWrite : bool
Public Overrides ReadOnly Property CanWrite As Boolean

Valor da propriedade

Boolean

true se a autenticação tiver ocorrido e o fluxo subjacente for gravável; caso contrário false .true if authentication has occurred and the underlying stream is writable; otherwise false.

Exemplos

O exemplo de código a seguir demonstra como exibir o valor dessa propriedade.The following code example demonstrates displaying the value of this property.

static void DisplayStreamProperties( SslStream^ stream )
{
   Console::WriteLine( L"Can read: {0}, write {1}", stream->CanRead, stream->CanWrite );
   Console::WriteLine( L"Can timeout: {0}", stream->CanTimeout );
}


static void DisplayStreamProperties(SslStream stream)
{
   Console.WriteLine("Can read: {0}, write {1}", stream.CanRead, stream.CanWrite);
   Console.WriteLine("Can timeout: {0}", stream.CanTimeout);
}
Private Shared Sub DisplayStreamProperties(stream As SslStream)
    Console.WriteLine("Can read: {0}, write {1}", stream.CanRead, stream.CanWrite)
    Console.WriteLine("Can timeout: {0}", stream.CanTimeout)
End Sub

Comentários

Se ocorrer uma autenticação bem-sucedida, essa propriedade retornará o valor retornado pela invocação CanWrite no fluxo subjacente.If successful authentication has occurred, this property returns the value returned by invoking CanWrite on the underlying stream.

O fluxo subjacente é especificado quando você cria uma instância da SslStream classe.The underlying stream is specified when you create an instance of the SslStream class.

Aplica-se a