Class: LogStashLogger::Device::TCP
- Inherits:
-
Socket
- Object
- Base
- Connectable
- Socket
- LogStashLogger::Device::TCP
- Defined in:
- lib/logstash-logger/device/tcp.rb
Constant Summary
Constants inherited from Socket
Instance Attribute Summary collapse
-
#ssl_certificate ⇒ Object
readonly
Returns the value of attribute ssl_certificate.
Attributes inherited from Socket
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(opts) ⇒ TCP
constructor
A new instance of TCP.
- #use_ssl? ⇒ Boolean
Methods inherited from Connectable
#connected?, #flush, #to_io, #write
Methods inherited from Base
#close, #flush, #to_io, #write
Constructor Details
#initialize(opts) ⇒ TCP
Returns a new instance of TCP.
8 9 10 11 12 13 |
# File 'lib/logstash-logger/device/tcp.rb', line 8 def initialize(opts) super @ssl_certificate = opts[:ssl_certificate] @use_ssl = !!(@ssl_certificate || opts[:use_ssl] || opts[:ssl_enable]) end |
Instance Attribute Details
#ssl_certificate ⇒ Object (readonly)
Returns the value of attribute ssl_certificate.
6 7 8 |
# File 'lib/logstash-logger/device/tcp.rb', line 6 def ssl_certificate @ssl_certificate end |
Instance Method Details
#use_ssl? ⇒ Boolean
15 16 17 |
# File 'lib/logstash-logger/device/tcp.rb', line 15 def use_ssl? @use_ssl || !@ssl_certificate.nil? end |