class

GRPC::ServerStream(T)

Inherits Enumerable < Reference < Object

ServerStream(T) is the client's view of a server-streaming RPC response. It supports typed iteration over response messages.

Example (client streaming RPC): stream = client.list_features(rect) stream.each do |feature| pp feature end puts stream.status

Constructors

new(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)
Source

Instance methods

cancel
Source
each

Must yield this collection's elements to the block.

Source
finish(status_override : Status | Nil = nil) : Nil

finish signals end of stream. Pass a status_override only for error cases; on the normal path status comes from the transport via @status_proc.

Source
headers
Source
push(msg : T) : Nil
Source
status
Source
trailers
Source