Class: LogStashLogger::Device::UDP
- Inherits:
-
Socket
- Object
- Base
- Connectable
- Socket
- LogStashLogger::Device::UDP
- Defined in:
- lib/logstash-logger/device/udp.rb
Constant Summary
Constants inherited from Socket
Instance Attribute Summary
Attributes inherited from Socket
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Socket
Methods inherited from Connectable
#connected?, #flush, #to_io, #write
Methods inherited from Base
#close, #flush, #initialize, #to_io, #write
Constructor Details
This class inherits a constructor from LogStashLogger::Device::Socket
Instance Method Details
#connect ⇒ Object
4 5 6 7 8 9 |
# File 'lib/logstash-logger/device/udp.rb', line 4 def connect @io = UDPSocket.new.tap do |socket| socket.connect(@host, @port) socket.sync = sync unless sync.nil? end end |