Sha256: 9f91d66eac3a128d2717c77b8deae3319ca75370d7e47bf9c5973878cfa2791b
Contents?: true
Size: 491 Bytes
Versions: 28
Compression:
Stored size: 491 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) loop do conn = sock.accept server.run(conn) end
Version data entries
28 entries across 28 versions & 1 rubygems