Sha256: caec52f2508f12dcd73a76c397615d97f18e0826bc97cf988fc39131ae1b3da4

Contents?: true

Size: 500 Bytes

Versions: 7

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:40002/"

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

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
grenache-ruby-http-0.2.16 examples/worker.rb
grenache-ruby-http-0.2.15 examples/worker.rb
grenache-ruby-http-0.2.14 examples/worker.rb
grenache-ruby-http-0.2.13 examples/worker.rb
grenache-ruby-http-0.2.12 examples/worker.rb
grenache-ruby-http-0.2.11 examples/worker.rb
grenache-ruby-http-0.2.9 examples/worker.rb