class

GRPC::Transport::ResponseContext

Inherits Reference < Object

ResponseContext bundles the framed body bytes and trailer strings for one gRPC response. A pointer to this object is stashed in DataSource.ptr so the DATA read callback can both send body bytes and, when the body is exhausted, submit the trailing HEADERS frame (grpc-status / grpc-message).

Constructors

new(data : Bytes, stream_id : Int32, trailer_entries : Array(Tuple(String, String)))
Source

Instance methods

data
Source
data=(data : Bytes)
Source
offset
Source
offset=(offset : Int32)
Source
remaining
Source
stream_id
Source
stream_id=(stream_id : Int32)
Source
trailer_entries

Keep trailer strings alive so Nv pointers remain valid during submit_trailer.

Source
trailer_entries=(trailer_entries : Array(Tuple(String, String)))

Keep trailer strings alive so Nv pointers remain valid during submit_trailer.

Source