Sha256: 51ed7ead028153f4567a0e187750023c6d963949417bf91f3c48edb5776cc326

Contents?: true

Size: 652 Bytes

Versions: 1

Compression:

Stored size: 652 Bytes

Contents

# frozen_string_literal: true

require 'grpc_kit/calls'

module GrpcKit
  module Calls::Client
    class ServerStreamer < GrpcKit::Calls::Call
      attr_reader :deadline, :service_name, :method_name
      attr_reader :metadata
      alias outgoing_metadata metadata

      def send_msg(data, timeout: nil, metadata: {}, last: false)
        raise 'No method error' if @restrict

        @stream.send_msg(data, last: last, timeout: timeout, metadata: metadata)
      end

      def recv(last: false)
        raise 'No method error' if @restrict

        @stream.recv_msg(last: last)
      end

      def each
        # TODO
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grpc_kit-0.1.4 lib/grpc_kit/calls/client_server_streamer.rb