Class: GrpcKit::Calls::Client::ServerStreamer
- Inherits:
-
GrpcKit::Call
- Object
- GrpcKit::Call
- GrpcKit::Calls::Client::ServerStreamer
- Includes:
- Enumerable
- Defined in:
- lib/grpc_kit/calls/client_server_streamer.rb
Instance Attribute Summary
Attributes inherited from GrpcKit::Call
#metadata, #method, #method_name, #service_name
Instance Method Summary collapse
- #each {|response| ... } ⇒ Object
-
#recv ⇒ Object
This method is not thread safe, never call from multiple threads at once.
- #send_msg(data) ⇒ void
Methods inherited from GrpcKit::Call
Constructor Details
This class inherits a constructor from GrpcKit::Call
Instance Method Details
#each {|response| ... } ⇒ Object
26 27 28 |
# File 'lib/grpc_kit/calls/client_server_streamer.rb', line 26 def each loop { yield(recv) } end |
#recv ⇒ Object
This method is not thread safe, never call from multiple threads at once.
21 22 23 |
# File 'lib/grpc_kit/calls/client_server_streamer.rb', line 21 def recv @stream.recv_msg end |
#send_msg(data) ⇒ void
This method returns an undefined value.
15 16 17 |
# File 'lib/grpc_kit/calls/client_server_streamer.rb', line 15 def send_msg(data) @stream.send_msg(data, last: true, metadata: ) end |