C# Класс Org.Mentalis.Security.Ssl.SecureTcpClient

Provides secure client connections for TCP network services.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Close ( ) : void

Closes the TCP connection.

Connect ( IPAddress address, int port ) : void

Connects the client to a remote TCP host using the specified IP address and port number.

Connect ( IPEndPoint remoteEP ) : void

Connects the client to a remote TCP host using the specified remote network endpoint.

Connect ( string hostname, int port ) : void

Connects the client to the specified port on the specified host.

GetStream ( ) : Org.Mentalis.Security.Ssl.SecureNetworkStream

Returns the stream used to send and receive data.

SecureTcpClient ( ) : System

Initializes a new instance of the SecureTcpClient class.

The default constructor initializes a new SecureTcpClient. You must call the Connect method to establish a remote host connection.

SecureTcpClient ( IPEndPoint localEP ) : System

Initializes a new instance of SecureTcpClient bound to the specified local endpoint.

SecureTcpClient ( IPEndPoint localEP, Org.Mentalis.Security.Ssl.SecurityOptions options ) : System

Initializes a new instance of SecureTcpClient bound to the specified local endpoint.

SecureTcpClient ( SecureTcpClient client ) : System

Create a new SecureTcpClient based on an existing one.

SecureTcpClient ( Org.Mentalis.Security.Ssl.SecurityOptions options ) : System

Initializes a new instance of the SecureTcpClient class.

SecureTcpClient ( string hostname, int port ) : System

Initializes a new instance of the SecureTcpClient class and connects to the specified port on the specified host.

SecureTcpClient ( string hostname, int port, Org.Mentalis.Security.Ssl.SecurityOptions options ) : System

Initializes a new instance of the SecureTcpClient class and connects to the specified port on the specified host.

Защищенные методы

Метод Описание
Dispose ( ) : void

Releases the unmanaged resources used by the SecureTcpClient and optionally releases the managed resources.

Приватные методы

Метод Описание
SecureTcpClient ( SecureSocket socket ) : System

Initializes a new instance of SecureTcpClient.

This constructor is used by the SecureTcpListener class.

Описание методов

Close() публичный Метод

Closes the TCP connection.
An error occurs while closing the Socket.
public Close ( ) : void
Результат void

Connect() публичный Метод

Connects the client to a remote TCP host using the specified IP address and port number.
The parameter is a null reference (Nothing in Visual Basic). is less than MinPort -or- is greater than MaxPort. An operating system error occurs while accessing the Socket. The has been closed. The security negotiation failed.
public Connect ( IPAddress address, int port ) : void
address System.Net.IPAddress The IP address of the host to which you intend to connect.
port int The port number to which you intend to connect.
Результат void

Connect() публичный Метод

Connects the client to a remote TCP host using the specified remote network endpoint.
The parameter is a null reference (Nothing in Visual Basic). An operating system error occurs while accessing the Socket. The has been closed. The security negotiation failed.
public Connect ( IPEndPoint remoteEP ) : void
remoteEP System.Net.IPEndPoint The IP endpoint to which you intend to connect.
Результат void

Connect() публичный Метод

Connects the client to the specified port on the specified host.
The parameter is a null reference (Nothing in Visual Basic). is less than MinPort -or- is greater than MaxPort. An operating system error occurs while accessing the Socket. The has been closed. The security negotiation failed.
public Connect ( string hostname, int port ) : void
hostname string The DNS name of the remote host to which you intend to connect.
port int The port number of the remote host to which you intend to connect.
Результат void

Dispose() защищенный Метод

Releases the unmanaged resources used by the SecureTcpClient and optionally releases the managed resources.
protected Dispose ( ) : void
Результат void

GetStream() публичный Метод

Returns the stream used to send and receive data.
The has been closed. The SecureTcpClient is not connected to a remote host.
public GetStream ( ) : Org.Mentalis.Security.Ssl.SecureNetworkStream
Результат Org.Mentalis.Security.Ssl.SecureNetworkStream

SecureTcpClient() публичный Метод

Initializes a new instance of the SecureTcpClient class.
The default constructor initializes a new SecureTcpClient. You must call the Connect method to establish a remote host connection.
public SecureTcpClient ( ) : System
Результат System

SecureTcpClient() публичный Метод

Initializes a new instance of SecureTcpClient bound to the specified local endpoint.
is null (Nothing in Visual Basic). An operating system error occurs while accessing the Socket.
public SecureTcpClient ( IPEndPoint localEP ) : System
localEP System.Net.IPEndPoint The IPEndPoint to which you bind the TCP Socket.
Результат System

SecureTcpClient() публичный Метод

Initializes a new instance of SecureTcpClient bound to the specified local endpoint.
is null (Nothing in Visual Basic). An operating system error occurs while accessing the Socket.
public SecureTcpClient ( IPEndPoint localEP, Org.Mentalis.Security.Ssl.SecurityOptions options ) : System
localEP System.Net.IPEndPoint The IPEndPoint to which you bind the TCP Socket.
options Org.Mentalis.Security.Ssl.SecurityOptions The security options to use.
Результат System

SecureTcpClient() публичный Метод

Create a new SecureTcpClient based on an existing one.
public SecureTcpClient ( SecureTcpClient client ) : System
client SecureTcpClient The SecureTcpClient to copy from.
Результат System

SecureTcpClient() публичный Метод

Initializes a new instance of the SecureTcpClient class.
public SecureTcpClient ( Org.Mentalis.Security.Ssl.SecurityOptions options ) : System
options Org.Mentalis.Security.Ssl.SecurityOptions The security options to use.
Результат System

SecureTcpClient() публичный Метод

Initializes a new instance of the SecureTcpClient class and connects to the specified port on the specified host.
is null (Nothing in Visual Basic). is less than MinPort -or- is greater than MaxPort. An error is encountered when resolving
-or-

an error occurred while connecting to the remote host.
The security negotiation failed.
public SecureTcpClient ( string hostname, int port ) : System
hostname string DNS name of the remote host to which you intend to connect.
port int Port number of the remote host to which you intend to connect.
Результат System

SecureTcpClient() публичный Метод

Initializes a new instance of the SecureTcpClient class and connects to the specified port on the specified host.
is null (Nothing in Visual Basic). is less than MinPort -or- is greater than MaxPort. An error is encountered when resolving -or- an error occurred while connecting to the remote host. The security negotiation failed.
public SecureTcpClient ( string hostname, int port, Org.Mentalis.Security.Ssl.SecurityOptions options ) : System
hostname string DNS name of the remote host to which you intend to connect.
port int Port number of the remote host to which you intend to connect.
options Org.Mentalis.Security.Ssl.SecurityOptions The security options to use.
Результат System