ZeroMQ/filecode/examples/Ruby/peering3.rb
# Route to local workers whenever they're available
Route to local workers whenever they're available
Route to local workers whenever they ' re available
def route_to_frontend(frames)
    if @peers.include? frames[0]
      @cloud_frontend.send_strings frames
    else
      @local_frontend.send_strings frames
    end
  end
def route_to_frontend ( frames ) if @peers . include? frames [ 0 ] @cloud_frontend . send_strings frames else @local_frontend . send_strings frames end end
Route to local workers whenever they're available
Route to local workers whenever they ' re available
frames
<not_specific>