class

GRPC::BidiCall(Req, Res)

Inherits Enumerable < Reference < Object

BidiCall(Req, Res) is the client handle for a bidirectional streaming RPC. The client sends and receives messages concurrently.

Example: call = client.chat spawn do messages.each { |msg| call.send(msg) } call.close_send end call.each { |reply| pp reply }

Constructors

new(send_proc : Req -> _, close_proc : -> _, recv_chan : ::Channel(Exception | Res), 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
close_send

close_send signals the end of the client's request stream.

Source
each

Must yield this collection's elements to the block.

Source
headers
Source
send(message : Req) : Nil

send transmits a request message to the server.

Source
status
Source
trailers
Source