class Lumberjack::Beats::Connection

def initialize(fd, server)

def initialize(fd, server)
  @parser = Parser.new
  @fd = fd
  @server = server
  @ack_handler = nil
  # Fetch the details of the host before reading anything from the socket
  # se we can use that information when debugging connection issues with
  # remote hosts.
  begin
    @peer = "#{@fd.peeraddr[3]}:#{@fd.peeraddr[1]}"
  rescue IOError
    # This can happen if the connection is drop or close before
    # fetching the host details, lets return a generic string.
    @peer = PEER_INFORMATION_NOT_AVAILABLE
  end
end