Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions grpc/ruby_client/helloworld_client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require 'grpc'
require './proto/helloworld_services_pb'

include Sample

def main
stub = Greeter::Stub.new('127.0.0.1:5502', :this_channel_is_insecure)

hello_request = HelloRequest.new(first_name: "Roger", last_name: "Federer")
hello_reply = stub.say_hello(hello_request)
puts hello_reply.message
end

main
16 changes: 16 additions & 0 deletions grpc/ruby_client/notification_client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require 'grpc'
require './proto/notification_services_pb'

include Sample

def main
stub = Notifier::Stub.new('127.0.0.1:5502', :this_channel_is_insecure)

pereodic_hello_request = PereodicHelloRequest.new(first_name: "Roger", last_name: "Federer")
resp = stub.pereodic_hello(pereodic_hello_request)
resp.each do |r|
puts r.message
end
end

main
2 changes: 1 addition & 1 deletion grpc/ruby_client/proto/helloworld_services_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions grpc/ruby_client/proto/notification_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion grpc/ruby_client/proto/notification_services_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.