Sha256: 0463201a7bacfd6c3bdb47045982b2b86bac2d7d77a4abf8e1ab4c2d81c8f55d

Contents?: true

Size: 500 Bytes

Versions: 5

Compression:

Stored size: 500 Bytes

Contents

require_relative '../lib/grenache-ruby-http.rb'

# This is another way to set a configuration:
#
# Grenache::Http.configure do |conf|
#   conf.grape_address = "http://127.0.0.1:40002/"
# end

EM.run do

  Signal.trap("INT")  { EventMachine.stop }
  Signal.trap("TERM") { EventMachine.stop }

  c = Grenache::Http.new grape_address: "http://127.0.0.1:30001/"

  c.listen('rpc_test', 5004) do |msg|
    #[StandardError.new("Error!"),"hello #{msg.payload}"]
    [nil, "hello #{msg.payload}"]
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
grenache-ruby-http-0.2.21 examples/worker.rb
grenache-ruby-http-0.2.20 examples/worker.rb
grenache-ruby-http-0.2.19 examples/worker.rb
grenache-ruby-http-0.2.18 examples/worker.rb
grenache-ruby-http-0.2.17 examples/worker.rb