public Stream Connect(IBrokerInfo broker) { MCertificate cert = GetClientCert(broker); SecurityOptions options = new SecurityOptions( SecureProtocol.Tls1, cert, ConnectionEnd.Client ); if ( broker.SslOptions != null && broker.SslOptions.IgnoreValidationErrors ) { _logger.Warn("Ignoring any certificate validation errors during SSL handshake..."); options.VerificationType = CredentialVerification.None; } _tcpClient = new MyTcpClient(broker.Host, broker.Port, options); return _tcpClient.GetStream(); }
public Stream Connect(IBrokerInfo broker) { MCertificate cert = GetClientCert(broker); SecurityOptions options = new SecurityOptions( SecureProtocol.Tls1, cert, ConnectionEnd.Client ); if (broker.SslOptions != null && broker.SslOptions.IgnoreValidationErrors) { _logger.Warn("Ignoring any certificate validation errors during SSL handshake..."); options.VerificationType = CredentialVerification.None; } _tcpClient = new MyTcpClient(broker.Host, broker.Port, options); return(_tcpClient.GetStream()); }
public Stream Connect(IBrokerInfo broker) { _tcpClient = new MyTcpClient(broker.Host, broker.Port); return(_tcpClient.GetStream()); }
/// <summary> /// send a string of data over the socket /// </summary> /// <param name="sData">The data to send</param> private void Send(string sData) { byte[] bSend = ASCII.GetBytes(sData + Environment.NewLine); socket.GetStream().Write(bSend, 0, bSend.Length); }
public Stream Connect(IBrokerInfo broker) { _tcpClient = new MyTcpClient(broker.Host, broker.Port); return _tcpClient.GetStream(); }