Sha256: 9dd9e7f4018e80c9b598901727a48d5b357a690bbd0f2ee978c9c6587c52de0e
Contents?: true
Size: 685 Bytes
Versions: 3
Compression:
Stored size: 685 Bytes
Contents
require_relative '../lib/grenache-ruby-http.rb' Grenache::Http.configure do |conf| conf.grape_address = "http://127.0.0.1:40002/" conf.key = File.expand_path('.') + "/ssl/server-key.pem" conf.cert_pem = File.expand_path('.') + "/ssl/server-chain.pem" conf.ca = File.expand_path('.') + "/ssl/ca-crt.pem" conf.service_host = "localhost" end EM.run do Signal.trap("INT") { EventMachine.stop } Signal.trap("TERM") { EventMachine.stop } c = Grenache::Http.new 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
grenache-ruby-http-0.2.9 | examples/worker_ssl.rb |
grenache-ruby-http-0.2.8 | examples/worker_ssl.rb |
grenache-ruby-http-0.2.7 | examples/worker_ssl.rb |