Sha256: 1e11423454f1a09fbf63af4ec080e3c63260ffcd49fbf8a3ac5fbb1353fa84cf
Contents?: true
Size: 512 Bytes
Versions: 2
Compression:
Stored size: 512 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path('./examples/helloworld') require 'grpc_kit' require 'socket' require 'pry' require 'helloworld_services_pb' class GreeterServer < Helloworld::Greeter::Service def say_hello(hello_req, _unused_call) Helloworld::HelloReply.new(message: "Hello #{hello_req.name}") end end sock = TCPServer.new(50051) server = GrpcKit::Server.new server.handle(GreeterServer.new) server.run loop do conn = sock.accept server.session_start(conn) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
grpc_kit-0.1.1 | examples/helloworld_server.rb |
grpc_kit-0.1.0 | examples/helloworld_server.rb |