Class: GrpcKit::Calls::Client::ClientStreamer

Inherits:
GrpcKit::Calls::Call show all
Defined in:
lib/grpc_kit/calls/client_client_streamer.rb

Instance Attribute Summary

Attributes inherited from GrpcKit::Calls::Call

#metadata, #method, #method_name, #service_name

Instance Method Summary collapse

Methods inherited from GrpcKit::Calls::Call

#deadline, #initialize, #normal_mode, #restrict_mode

Constructor Details

This class inherits a constructor from GrpcKit::Calls::Call

Instance Method Details

#close_and_recvArray<Object>

Returns response objects

Returns:

  • (Array<Object>)

    response objects


28
29
30
# File 'lib/grpc_kit/calls/client_client_streamer.rb', line 28

def close_and_recv
  @stream.close_and_recv
end

#recv(last: false) ⇒ Object

Returns response object

Parameters:

  • last (Boolean)

Returns:

  • (Object)

    response object


21
22
23
24
25
# File 'lib/grpc_kit/calls/client_client_streamer.rb', line 21

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

  @stream.recv_msg(last: last)
end

#send_msg(data, last: false) ⇒ void

This method returns an undefined value.

Parameters:

  • data (Object)

    request message

  • last (Boolean)

13
14
15
16
17
# File 'lib/grpc_kit/calls/client_client_streamer.rb', line 13

def send_msg(data, last: false)
  raise 'No method error' if @restrict

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