TlsStream Class
Namespace: Rebex.Net
Assembly: Rebex.Tls.dll (version 7.0.9147)
Represents a TLS-enabled TCP stream.
Syntax
public class TlsStream : Stream, IAsyncDisposable, IDisposable
Inherited Members
Remarks
This class is suitable for securing your socket communication using TLS 1.3, TLS 1.2, TLS 1.1 and TLS 1.0 protocols.
Constructors
Name | Description |
---|---|
Tls |
Initializes the Tls |
Tls |
Initializes the Tls |
Properties
Name | Description |
---|---|
Application |
Gets the negotiated application protocol (via ALPN extension). |
Can |
Gets a value indicating whether the stream is readable. |
Can |
Returns |
Can |
Gets a value indicating whether the stream can time out. |
Can |
Gets a value indicating whether the stream is writable. |
Cipher | Gets the negotiated TLS cipher. |
Is |
Gets a value indicating whether TLS security on this Tls |
Is |
Gets a value indicating whether the local side of the TLS connection is the server side. |
Length | Not supported. Throws Not |
Local |
Gets the certificate chain used to authenticate the remote endpoint. |
Log |
Gets or sets the log writer used by this object. |
Parameters | Gets or sets the security parameters of the current Tls |
Position | Not supported. Throws Not |
Read |
Gets or sets the length of time, in milliseconds, until the read operation times out, or the value -1 or 0 to indicate that the operation does not time out. |
Remote |
Gets the certificate chain used to authenticate the remote endpoint. |
Write |
Gets or sets the length of time, in milliseconds, until the write operation times out, or the value -1 or 0 to indicate that the operation does not time out. |
Methods
Name | Description |
---|---|
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Authenticate |
Performs TLS negotiation. This Tls |
Begin |
Asynchronously reads data from this Tls |
Begin |
Asynchronously writes data into this Tls |
Close |
Asynchronously releases resources used by the TlsStream. |
Dispose(Boolean) | Releases resources used by this stream. |
Dispose |
Asynchronously releases resources used by this stream. |
End |
Ends a pending asynchronous read request. |
End |
Ends a pending asynchronous write request. |
Flush() | Causes any buffered data to be written. Has no effect on Tls |
Flush |
Causes any buffered data to be written. Has no effect on Tls |
Get |
Gets an instance of the Channel |
Get |
Gets a hash code of this object. |
Has |
Gets an indication whether a provider has a Channel |
Read(Byte[], Int32, Int32) | Reads data from this Tls |
Read |
Asynchronously reads data from this Tls |
Seek(Int64, Seek |
Not supported. Throws Not |
Set |
Not supported. Throws Not |
Shutdown() | Disables sends on this Tls |
Shutdown |
Disables sends on this Tls |
To |
Returns a string representation of this object. |
Write(Byte[], Int32, Int32) | Writes data into this Tls |
Write |
Asynchronously writes data into this Tls |
Events
Name | Description |
---|---|
Client |
Occurs when a TLS ClientHello has been received (useful for TLS servers only). |
Validating |
Occurs when a certificate provided by the remote end needs to be validated. |