Export (0) Print
Expand All

SslStream.Write Method (Byte[])

Writes the specified data to this stream.

Namespace:  System.Net.Security
Assembly:  System (in System.dll)

member Write : 
        buffer:byte[] -> unit

Parameters

buffer
Type: System.Byte[]

A Byte array that supplies the bytes written to the stream.

ExceptionCondition
ArgumentNullException

buffer is a null reference (Nothing in Visual Basic).

IOException

The write operation failed.

NotSupportedException

There is already a write operation in progress.

ObjectDisposedException

This object has been closed.

InvalidOperationException

Authentication has not occurred.

This method blocks while the operation completes. To prevent blocking while the operation completes, use the BeginWrite method.

You cannot call this method until you have successfully authenticated. To authenticate call one of the AuthenticateAsClient, or BeginAuthenticateAsClient, AuthenticateAsServer, BeginAuthenticateAsServer methods.

The SslStream class does not support multiple simultaneous write operations.

The following code example demonstrates writing to an authenticated SslStream.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft