class GRPC::RawBidiCall

Overview

RawBidiCall is the client-side handle for a full-duplex bidi-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 BidiCall(Req, Res).

Included Modules

Defined in:

grpc/stream.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(send_proc : Bytes -> Nil, close_proc : -> Nil, messages : ::Channel(Bytes | Nil), 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_send : Nil #

close_send signals the end of the client request stream.


[View source]
def each(& : Bytes -> ) : Nil #
Description copied from module Enumerable(Slice(UInt8))

Must yield this collection's elements to the block.


[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 iteration ends or cancel is called.


[View source]