SslStream Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Provides a stream used for client-server communication that uses the Secure Socket Layer (SSL) security protocol to authenticate the server and optionally the client.
Inheritance Hierarchy
System. . :: . .Object
System. . :: . .MarshalByRefObject
System.IO. . :: . .Stream
System.Net.Sockets. . :: . .NetworkStream
Microsoft.SPOT.Net.Security..::..SslStream
Namespace: Microsoft.SPOT.Net.Security
Assembly: System.Net.Security (in System.Net.Security.dll)
Syntax
'Declaration
Public Class SslStream _
Inherits NetworkStream
public class SslStream : NetworkStream
public ref class SslStream : public NetworkStream
type SslStream =
class
inherit NetworkStream
end
public class SslStream extends NetworkStream
The SslStream type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SslStream | Initializes a new instance of the SslStream class using the specified Socket. |
Top
Properties
Name | Description | |
---|---|---|
CanRead | Gets a value that indicates whether the NetworkStream supports reading. (Inherited from NetworkStream.) | |
CanSeek | Gets a value that indicates whether the stream supports seeking. This property is not currently supported.This property always returns false. (Inherited from NetworkStream.) | |
CanTimeout | Indicates whether timeout properties are usable for NetworkStream. (Inherited from NetworkStream.) | |
CanWrite | Gets a value that indicates whether the NetworkStream supports writing. (Inherited from NetworkStream.) | |
DataAvailable | Gets a value the indicates whether data is available in the stream. (Overrides NetworkStream. . :: . .DataAvailable.) | |
IsServer | Gets a value that indicates whether the local side of the connection used by this SslStream was authenticated as the server. | |
Length | Gets the length of the stream. (Overrides NetworkStream. . :: . .Length.) | |
Position | Gets or sets the current position in the stream. This property is not currently supported and always throws a NotSupportedException. (Inherited from NetworkStream.) | |
ReadTimeout | Gets or sets the amount of time that a read operation blocks waiting for data. (Inherited from NetworkStream.) | |
WriteTimeout | Gets or sets the amount of time that a write operation blocks waiting for data. (Inherited from NetworkStream.) |
Top
Methods
Name | Description | |
---|---|---|
AuthenticateAsClient(String, array<SslProtocols> [] () [] []) | Called by clients to authenticate the server and optionally the client in a client-server connection. The authentication process uses the specified SSL protocols. | |
AuthenticateAsClient(String, X509Certificate, SslVerification, array<SslProtocols> [] () [] []) | Called by clients to authenticate the server and optionally the client in a client-server connection. The authentication process uses the specified certificate collections and SSL protocols. | |
AuthenticateAsClient(String, X509Certificate, array<X509Certificate> [] () [] [], SslVerification, array<SslProtocols> [] () [] []) | Called by clients to authenticate the server and optionally the client in a client-server connection. The authentication process uses the specified certificate collections and SSL protocols. | |
AuthenticateAsServer(X509Certificate, SslVerification, array<SslProtocols> [] () [] []) | Called by servers to authenticate the server and optionally the client in a client-server connection using the specified certificate, requirements and security protocol. | |
AuthenticateAsServer(X509Certificate, array<X509Certificate> [] () [] [], SslVerification, array<SslProtocols> [] () [] []) | Called by servers to authenticate the server and optionally the client in a client-server connection using the specified certificate, verification requirements and security protocol. | |
Close() () () () | Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed. (Inherited from Stream.) | |
Close(Int32) | Closes the NetworkStream after waiting the specified time to allow data to be sent. (Inherited from NetworkStream.) | |
Dispose() () () () | Releases all resources used by the Stream. (Inherited from Stream.) | |
Dispose(Boolean) | Releases the unmanaged resources used by the SslStream and optionally releases the managed resources. (Overrides NetworkStream. . :: . .Dispose(Boolean).) | |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Performs cleanup operations. (Overrides Stream. . :: . .Finalize() () () ().) | |
Flush | Flushes data from the stream. This method is reserved for future use. (Inherited from NetworkStream.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Read | Reads data from this stream and stores it in the specified array. (Overrides NetworkStream. . :: . .Read(array<Byte> [] () [] [], Int32, Int32).) | |
ReadByte | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from Stream.) | |
Seek | Sets the current position of the stream to the given value. This method is not currently supported and always throws a NotSupportedException. (Inherited from NetworkStream.) | |
SetLength | Sets the length of the stream. This method always throws a NotSupportedException. (Inherited from NetworkStream.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UpdateCertificates | Updates the SSL stack to use updated certificates. | |
Write | Write the specified number of bytes to the underlying stream using the specified buffer and offset. (Overrides NetworkStream. . :: . .Write(array<Byte> [] () [] [], Int32, Int32).) | |
WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from Stream.) |
Top
Fields
Name | Description | |
---|---|---|
_disposed | Indicates whether the NetworkStream has been disposed. (Inherited from NetworkStream.) | |
_remoteEndPoint | Contains the stream's remote endpoint. (Inherited from NetworkStream.) | |
_socketType | Contains the socket type. (Inherited from NetworkStream.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.