Sha256: f4ac463f467a8919267f470d182416370d9073a737e83a5b3ce8f7640ae479ee
Contents?: true
Size: 524 Bytes
Versions: 2
Compression:
Stored size: 524 Bytes
Contents
require "protobuf" require_relative "reverse.pb.rb" # Protobuf::Logger.configure :level => Protobuf::Logger::DEBUG, :file => "./log/protobuf-client.log" configuration = { :host => "localhost", :port => 9399, } request = { :input => (ARGV[0] || 'hello world'), } Example::ReverseService.client(configuration).reverse(Example::ReverseRequest.new(request)) do |client| client.on_success do |response| puts response.reversed end client.on_failure do |error| puts 'It failed: ' + error.message end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
protobuffy-4.0.1 | examples/lib/example/reverse-client.rb |
protobuffy-4.0.0 | examples/lib/example/reverse-client.rb |