class

GRPC::RawServerStream

Inherits Enumerable < Reference < Object

RawServerStream is the client-side view of a server-streaming or bidi-streaming RPC response. It delivers raw protobuf bytes as they arrive. Generated client stubs wrap this in a typed ServerStream(T) for ergonomic use.

Constructors

build(messages : ::Channel(Bytes | Nil), *, headers_proc : -> Metadata = -> do Metadata.new end, status_proc : -> Status, trailers_proc : -> Metadata = -> do Metadata.new end, cancel_proc : -> Nil = -> do end, on_finish : -> Nil = -> do end) : self
Source
new(messages : ::Channel(Bytes | Nil), status_proc : -> Status, trailers_proc : -> Metadata = -> do Metadata.new end, cancel_proc : -> Nil = -> do end, on_finish : -> Nil = -> do end)
Source

Instance methods

cancel
Source
each

Must yield this collection's elements to the block.

Source
headers
Source
status
Source
trailers
Source
with_headers(headers_proc : -> Metadata) : self
Source
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.

Source