class
GRPC::Transport::ResponseContext
- GRPC::Transport::ResponseContext
- Reference
- Object
Overview
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).
Defined in:
grpc/transport/http2_server_connection.crConstructors
Instance Method Summary
- #data : Bytes
- #data=(data : Bytes)
- #offset : Int32
- #offset=(offset : Int32)
- #remaining : Int32
- #stream_id : Int32
- #stream_id=(stream_id : Int32)
-
#trailer_entries : Array(Tuple(String, String))
Keep trailer strings alive so Nv pointers remain valid during submit_trailer.
-
#trailer_entries=(trailer_entries : Array(Tuple(String, String)))
Keep trailer strings alive so Nv pointers remain valid during submit_trailer.
Constructor Detail
def self.new(data : Bytes, stream_id : Int32, trailer_entries : Array(Tuple(String, String)))
#
Instance Method Detail
def trailer_entries : Array(Tuple(String, String))
#
Keep trailer strings alive so Nv pointers remain valid during submit_trailer.
def trailer_entries=(trailer_entries : Array(Tuple(String, String)))
#
Keep trailer strings alive so Nv pointers remain valid during submit_trailer.