public ITcpConnection ConnectSslTo(Guid connectionId,
                                    IPEndPoint remoteEndPoint,
                                    TimeSpan connectionTimeout,
                                    bool validateServer,
                                    X509CertificateCollection clientCertificates,
                                    Action <ITcpConnection> onConnectionEstablished         = null,
                                    Action <ITcpConnection, SocketError> onConnectionFailed = null,
                                    bool verbose = true)
 {
     Ensure.NotNull(remoteEndPoint, "remoteEndPoint");
     return(TcpConnectionSsl.CreateConnectingConnection(connectionId, remoteEndPoint, validateServer, clientCertificates,
                                                        this, connectionTimeout, onConnectionEstablished, onConnectionFailed, verbose));
 }
 public ITcpConnection ConnectSslTo(Guid connectionId,
                                    IPEndPoint remoteEndPoint,
                                    TimeSpan connectionTimeout,
                                    Func <X509Certificate, X509Chain, SslPolicyErrors, ValueTuple <bool, string> > sslServerCertValidator,
                                    X509CertificateCollection clientCertificates,
                                    Action <ITcpConnection> onConnectionEstablished         = null,
                                    Action <ITcpConnection, SocketError> onConnectionFailed = null,
                                    bool verbose = true)
 {
     Ensure.NotNull(remoteEndPoint, "remoteEndPoint");
     return(TcpConnectionSsl.CreateConnectingConnection(connectionId, remoteEndPoint, sslServerCertValidator, clientCertificates,
                                                        this, connectionTimeout, onConnectionEstablished, onConnectionFailed, verbose));
 }
Exemple #3
0
 public ITcpConnection ConnectSslTo(Guid connectionId,
                                    IPEndPoint remoteEndPoint,
                                    TimeSpan connectionTimeout,
                                    string targetHost,
                                    bool validateServer,
                                    Action <ITcpConnection> onConnectionEstablished         = null,
                                    Action <ITcpConnection, SocketError> onConnectionFailed = null,
                                    bool verbose = true)
 {
     Ensure.NotNull(remoteEndPoint, "remoteEndPoint");
     Ensure.NotNullOrEmpty(targetHost, "targetHost");
     return(TcpConnectionSsl.CreateConnectingConnection(connectionId, remoteEndPoint, targetHost, validateServer,
                                                        this, connectionTimeout, onConnectionEstablished, onConnectionFailed, verbose));
 }