class GRPC::ClientStream(Req, Res)

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.cr

Constructors

Instance Method Summary

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) #

[View source]

Instance Method Detail

def cancel : Nil #

[View source]
def close_and_recv : Res #

close_and_recv closes the request stream and waits for the server response.


[View source]
def headers : Metadata #

[View source]
def send(message : Req) : Nil #

send transmits a request message to the server.


[View source]
def status : Status #

[View source]
def trailers : Metadata #

[View source]