Object
# File lib/graphite-api/connector.rb, line 26 def initialize host, port @host, @port = host, port end
# File lib/graphite-api/connector.rb, line 40 def inspect "#{self.class} #{@host}:#{@port}" end
# File lib/graphite-api/connector.rb, line 30 def puts message begin Logger.debug [:connector,:puts,[@host, @port].join(":"),message] socket.puts message + "\n" rescue Errno::EPIPE, Errno::EINVAL @socket = nil retry end end
# File lib/graphite-api/connector.rb, line 46 def socket if @socket.nil? || @socket.closed? Logger.debug [:connector,[@host,@port]] @socket = ::TCPSocket.new @host, @port end @socket end
[Validate]
Generated with the Darkfish Rdoc Generator 2.