class
GRPC::ClientStream(Req, Res)
- GRPC::ClientStream(Req, Res)
- Reference
- Object
Overview
ClientStream(Req, Res) is the client handle for a client-streaming RPC. The client sends multiple request messages, then receives a single response.
Example: call = client.record_route points.each { |p| call.send(p) } summary = call.close_and_recv
Defined in:
grpc/stream.crConstructors
Instance Method Summary
- #cancel : Nil
-
#close_and_recv : Res
close_and_recv closes the request stream and waits for the server response.
- #headers : Metadata
-
#send(message : Req) : Nil
send transmits a request message to the server.
- #status : Status
- #trailers : Metadata
Constructor Detail
def self.new(send_proc : Req -> _, close_proc : -> _, result : ::Channel(Exception | Res), headers_proc : -> Metadata = -> do
Metadata.new
end, status_proc : -> Status = -> do
Status.ok
end, trailers_proc : -> Metadata = -> do
Metadata.new
end, cancel_proc : -> Nil = -> do
end)
#
Instance Method Detail
def close_and_recv : Res
#
close_and_recv closes the request stream and waits for the server response.