Sha256: 13d516a37937dc81d94f7ef7ebee7167b015933472b54ed5a1cf43a325c17208

Contents?: true

Size: 747 Bytes

Versions: 9

Compression:

Stored size: 747 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/127.0.0.1.key",
                       cert_pem: File.expand_path('.') + "/ssl/127.0.0.1.chain.crt",
                       cert_ecdh_curve: 'secp384r1',
                       ca: File.expand_path('.') + "/ssl/ca.crt",
                       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

9 entries across 9 versions & 1 rubygems

Version Path
grenache-ruby-http-0.2.21 examples/worker_ssl.rb
grenache-ruby-http-0.2.20 examples/worker_ssl.rb
grenache-ruby-http-0.2.19 examples/worker_ssl.rb
grenache-ruby-http-0.2.18 examples/worker_ssl.rb
grenache-ruby-http-0.2.17 examples/worker_ssl.rb
grenache-ruby-http-0.2.16 examples/worker_ssl.rb
grenache-ruby-http-0.2.15 examples/worker_ssl.rb
grenache-ruby-http-0.2.14 examples/worker_ssl.rb
grenache-ruby-http-0.2.13 examples/worker_ssl.rb