class
GRPC::RawServerStream
- GRPC::RawServerStream
- Reference
- Object
Overview
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.
Included Modules
- Enumerable(Slice(UInt8))
Defined in:
grpc/stream.crConstructors
- .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
- .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)
Instance Method Summary
- #cancel : Nil
-
#each(& : Bytes -> ) : Nil
Must yield this collection's elements to the block.
- #headers : Metadata
- #status : Status
- #trailers : Metadata
- #with_headers(headers_proc : -> Metadata) : self
-
#with_on_finish(hook : -> Nil) : self
with_on_finish appends a completion callback and returns self.
Constructor Detail
def self.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
#
def self.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)
#
Instance Method Detail
def each(& : Bytes -> ) : Nil
#
Description copied from module Enumerable(Slice(UInt8))
Must yield this collection's elements to the block.
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.