Sha256: b7f06d9bcd671822a8d8555582f1ededa82450b53022d965cfda4f12d884550c

Contents?: true

Size: 495 Bytes

Versions: 29

Compression:

Stored size: 495 Bytes

Contents

module Ring
class SQA

  class Responder < Poller
    def run
      udp = udp_socket
      Log.debug "Responder binding to #{address.inspect} in port #{port}" if CFG.debug?
      udp.bind address, port
      loop { respond udp }
    end

    private

    def initialize
      run
    end

    def respond udp
      data, far_end = udp.recvfrom MAX_READ
      udp.send data, 0, far_end[3], port+1
      Log.debug "Sent response '#{data}' to '#{far_end[3]}'" if CFG.debug?
    end

  end

end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ring-sqa-0.4.3 lib/ring/sqa/poller/responder.rb
ring-sqa-0.4.2 lib/ring/sqa/poller/responder.rb
ring-sqa-0.4.1 lib/ring/sqa/poller/responder.rb
ring-sqa-0.3.1 lib/ring/sqa/poller/responder.rb
ring-sqa-0.3.0 lib/ring/sqa/poller/responder.rb
ring-sqa-0.2.2 lib/ring/sqa/poller/responder.rb
ring-sqa-0.2.1 lib/ring/sqa/poller/responder.rb
ring-sqa-0.2.0 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.12 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.11 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.10 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.9 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.8 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.7 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.6 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.5 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.4 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.3 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.2 lib/ring/sqa/poller/responder.rb
ring-sqa-0.1.1 lib/ring/sqa/poller/responder.rb