Class: Flydata::Output::SslForwarder

Inherits:
TcpForwarder show all
Defined in:
lib/flydata/output/forwarder.rb

Constant Summary

Constants inherited from TcpForwarder

TcpForwarder::BUFFER_SIZE, TcpForwarder::DEFUALT_SEND_TIMEOUT, TcpForwarder::FORWARD_HEADER, TcpForwarder::RETRY_INTERVAL, TcpForwarder::RETRY_LIMIT

Instance Attribute Summary

Attributes inherited from TcpForwarder

#buffer_record_count, #buffer_size

Instance Method Summary collapse

Methods inherited from TcpForwarder

#buffer_full?, #close, #emit, #flush, #initialize, #pickup_server, #reset, #send, #set_options

Methods included from CommandLoggable

#before_logging, #log_error_stderr, #log_info_stdout, #log_warn_stderr

Constructor Details

This class inherits a constructor from Flydata::Output::TcpForwarder

Instance Method Details

#connect(server) ⇒ Object



156
157
158
159
160
161
162
163
# File 'lib/flydata/output/forwarder.rb', line 156

def connect(server)
  tcp_sock = super
  ssl_ctx = ssl_ctx_with_verification
  ssl_sock = OpenSSL::SSL::SSLSocket.new(tcp_sock, ssl_ctx)
  ssl_sock.sync_close = true
  ssl_sock.connect
  ssl_sock
end