System.Net.Security.SslStream.Write Method

Write the specified number of bytes to the underlying stream using the specified buffer and offset.

Syntax

public override void Write (byte[] buffer, int offset, int count)

Parameters

buffer
A byte array that supplies the bytes written to the stream.
offset
A int that contains the zero-based location in buffer at which to begin reading bytes to be written to the stream.
count
A int that contains the number of bytes to read from buffer.

Remarks

This method blocks while the operation completes. To prevent blocking while the operation completes the operation completes, use the SslStream.BeginWrite(Byte[], int, int, AsyncCallback, object) method.

You cannot call this method until you have successfully authenticated. To authenticate call one of the erload:System.Net.Security.SslStream.AuthenticateAsClient, or erload:System.Net.Security.SslStream.BeginAuthenticateAsClient, erload:System.Net.Security.SslStream.AuthenticateAsServer, erload:System.Net.Security.SslStream.BeginAuthenticateAsServer methods.

The System.Net.Security.SslStream class does not support multiple simultaneous write operations.

Requirements

Namespace: System.Net.Security
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0