Module: StatsD::Instrument::ConnectionBehavior
- Included in:
- UdpConnection, UdsConnection
- Defined in:
- lib/statsd/instrument/connection_behavior.rb
Instance Method Summary collapse
Instance Method Details
#close ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/statsd/instrument/connection_behavior.rb', line 6 def close @socket&.close rescue IOError, SystemCallError => e StatsD.logger.debug do "[#{self.class.name}] Error closing socket: #{e.class}: #{e.}" end ensure @socket = nil end |
#send_buffer_size ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/statsd/instrument/connection_behavior.rb', line 16 def send_buffer_size if socket send_buffer_size_from_socket(socket) else @max_packet_size end end |
#type ⇒ Object
24 25 26 |
# File 'lib/statsd/instrument/connection_behavior.rb', line 24 def type raise NotImplementedError, "#{self.class} must implement #type" end |