TlsSocket Class
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9119)
Represents a TLS/SSL-enabled TCP socket.
Syntax
public class TlsSocket : ISocketExt, ISocket, IDisposable, IAsyncDisposable
Inherited Members
Remarks
This class is suitable for securing your socket communication using TLS 1.2, TLS 1.1 and TLS 1.0 protocols. SSL 3.0 is still supported as well, but should not be used.
Constructors
Name | Description |
---|---|
TlsSocket() | Initializes an instance of the TlsSocket class. |
TlsSocket(ISocket) | Initializes an instance of the TlsSocket class with the specified base socket. |
TlsSocket(Socket) | Initializes an instance of the TlsSocket class with the specified base socket. |
Properties
Name | Description |
---|---|
ApplicationProtocol | Gets the negotiated application protocol; or null reference if no protocol was negotiated. |
Available | Gets the amount of data that has been received from the network and is available to be read. |
Cipher | Gets the active cipher. |
ClientCertificate | Gets the client's certificate chain. |
CompressionMethod | Gets the active data compression method. |
Connected | Gets a value indicating whether a TlsSocket is connected to a remote resource. |
Context | Gets or sets a custom context object associated with this TlsSocket. |
Entity | Gets the entity. |
Factory | Gets the instance of ISocketFactory that created this ISocket. |
Information | Gets socket information on the underlying socket object. |
IsSecure | Gets the current security state of the connection. |
LocalEndPoint | Gets the local endpoint. |
LogWriter | Gets or sets the logger used by this object. |
Parameters | Gets or sets the security parameters of the current socket. |
RemoteEndPoint | Gets the remote endpoint. |
ServerCertificate | Gets the server's certificate chain. |
Session | Gets the connection session |
Socket | Gets the internal Socket value (only for sockets based on Socket or ProxySocket, otherwise null is returned). |
Timeout | Gets or sets the length of time, in milliseconds, until the operation times out, or the value -1 or 0 to indicate that the operation does not time out. |
Methods
Name | Description |
---|---|
BeginConnect(EndPoint, AsyncCallback, Object) | Begins an asynchronous request for a connection to a network device. |
BeginConnect(String, Int32, AsyncCallback, Object) | Begins an asynchronous request for a connection to a network device. |
BeginNegotiate(AsyncCallback, Object) | Negotiates TLS/SSL cipher. |
BeginReceive(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) | Ends a pending asynchronous read. |
BeginSend(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) | Sends data asynchronously to a connected ISocket. |
Close() | Forces a TlsSocket connection to close. |
CloseAsync() | Asynchronously releases resources used by the TlsSocket. |
Connect(EndPoint) | Establishes a connection to a remote device. |
Connect(String, Int32) | Establishes a connection to a remote device. |
Dispose() | Disposes the object. |
Dispose(Boolean) | Releases the unmanaged resources used by the TlsSocket and optionally releases the managed resources. |
DisposeAsync() | Asynchronously releases resources used by the TlsSocket. |
DisposeAsync(Boolean) | Asynchronously releases the unmanaged resources used by the TlsSocket and optionally releases the managed resources. |
EndConnect(IAsyncResult) | Ends a pending asynchronous connection request. |
EndNegotiate(IAsyncResult) | Ends a pending asynchronous negotiation. |
EndReceive(IAsyncResult) | Ends a pending asynchronous read. |
EndSend(IAsyncResult) | Ends a pending asynchronous send. |
GetChannelBinding(ChannelBindingType) | Gets an instance of the ChannelBinding that matches the |
GetConnectionState() | Gets a value that indicates whether the SocketState is currently connected to a remote host. |
GetHashCode() | Gets a hash code of this object. |
HasChannelBinding(ChannelBindingType) | Gets an indication whether a provider has a ChannelBinding that matches the |
Negotiate() | Negotiates TLS/SSL cipher. |
NegotiateAsync() | Negotiates TLS/SSL cipher. |
Poll(Int32, SocketSelectMode) | Determines the status of the socket. |
Receive(ArraySegment<Byte>) | Receives data from a connected TlsSocket. |
Receive(Byte[]) | Receives data from a connected TlsSocket. |
Receive(Byte[], Int32, Int32) | Receives the specified amount of data from a connected TlsSocket into a specific location of the receive buffer and using the supplied flags. |
Receive(Byte[], Int32, Int32, SocketFlags) | Receives the specified amount of data from a connected TlsSocket into a specific location of the receive buffer and using the supplied flags. |
Receive(Byte[], Int32, SocketFlags) | Receives the specified amount of data from a connected TlsSocket using the supplied flags. |
Receive(Byte[], SocketFlags) | Receives data from a connected TlsSocket using the supplied flags. |
ReceiveAsync(ArraySegment<Byte>) | Receives data from a connected TlsSocket. |
Renegotiate() | Renegotiates TLS/SSL cipher (if allowed by the other side). Only supported by TLS 1.2 or earlier. |
Send(ArraySegment<Byte>) | Sends data to a connected TlsSocket. |
Send(Byte[]) | Sends data to a connected TlsSocket. |
Send(Byte[], Int32, Int32) | Sends the specified amount of data to a connected TlsSocket starting at the indicated location in the data and using the supplied flags.| |
Send(Byte[], Int32, Int32, SocketFlags) | Sends the specified amount of data to a connected TlsSocket starting at the indicated location in the data and using the supplied flags. |
Send(Byte[], Int32, SocketFlags) | Sends the specified amount of data to a connected TlsSocket using the supplied flags. |
Send(Byte[], SocketFlags) | Sends data to a connected TlsSocket using the supplied flags. |
SendAsync(ArraySegment<Byte>) | Sends data to a connected TlsSocket. |
Shutdown(SocketShutdown) | Disables sends and receives on a TlsSocket. |
ShutdownAsync() | Disables sends on a TlsSocket. |
ToString() | Returns a string representation of the current TlsSocket. |
Unprotect() | Reverts back to an unencrypted socket. Usage of this method is strongly discouraged. |
Explicit Interface Implementations
Name | Description |
---|---|
IAsyncDisposable.DisposeAsync() | Asynchronously releases resources used by the TlsSocket. |