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)
SourceInstance methods
cancel
Sourcefinish(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.
headers
Sourcepush(msg : T) : Nil
Sourcestatus
Sourcetrailers
Source