SslStream.CanWrite Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Property Value
true
if authentication has occurred and the underlying stream is writable; otherwise false
.
Examples
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
Remarks
If successful authentication has occurred, this property returns the value returned by invoking CanWrite on the underlying stream.
The underlying stream is specified when you create an instance of the SslStream class.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om