class GRPC::RawClientCall

Overview

RawClientCall is the client-side handle for a live client-streaming RPC. All transport operations are captured as procs so the type is independent of any concrete transport implementation. Generated client stubs wrap this in a typed ClientStream(Req, Res).

Defined in:

grpc/stream.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(send_proc : Bytes -> Nil, close_and_recv_proc : -> Bytes, headers_proc : -> Metadata, status_proc : -> Status, trailers_proc : -> Metadata, cancel_proc : -> Nil, on_finish : -> Nil = -> do end) #

[View source]

Instance Method Detail

def cancel : Nil #

[View source]
def close_and_recv : Bytes #

close_and_recv closes the request stream and blocks until the server's single response arrives. Returns the raw response bytes.


[View source]
def headers : Metadata #

[View source]
def send_raw(message_bytes : Bytes) : Nil #

send_raw passes message_bytes (raw protobuf, no gRPC framing) to the transport.


[View source]
def status : Status #

[View source]
def trailers : Metadata #

[View source]
def with_on_finish(hook : -> Nil) : self #

with_on_finish appends a completion callback and returns self. The callback is invoked once when close_and_recv/cancel completes.


[View source]