Class: Pdns::Remotebackend::Unix

Inherits:
Connector show all
Defined in:
lib/pdns/remotebackend.rb

Instance Method Summary collapse

Methods inherited from Connector

#initialize, #mainloop

Constructor Details

This class inherits a constructor from Pdns::Remotebackend::Connector

Instance Method Details

#runObject



188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/pdns/remotebackend.rb', line 188

def run
  @path = @options[:path] || "/tmp/remotebackend.sock"
  begin 
    Socket.unix_server_loop(@path) do |sock, client_addrinfo| 
      begin 
        mainloop sock, sock
      ensure
        sock.close
      end
    end
  rescue SystemExit, Interrupt 
  end
end