Sha256: 5f9e14afd684d3278f20fbaba31e84addd64bf26b8fea6986b3e903c12580dfc

Contents?: true

Size: 696 Bytes

Versions: 1

Compression:

Stored size: 696 Bytes

Contents

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

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/",
                       key:  File.expand_path('.') + "/ssl/server-key.pem",
                       cert_pem: File.expand_path('.') + "/ssl/server-chain.pem",
                       ca: File.expand_path('.') + "/ssl/ca-crt.pem",
                       service_host: "localhost")

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grenache-ruby-http-0.2.11 examples/worker_ssl.rb