class GRPC::Transport::ResponseContext

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.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(data : Bytes, stream_id : Int32, trailer_entries : Array(Tuple(String, String))) #

[View source]

Instance Method Detail

def data : Bytes #

[View source]
def data=(data : Bytes) #

[View source]
def offset : Int32 #

[View source]
def offset=(offset : Int32) #

[View source]
def remaining : Int32 #

[View source]
def stream_id : Int32 #

[View source]
def stream_id=(stream_id : Int32) #

[View source]
def trailer_entries : Array(Tuple(String, String)) #

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


[View source]
def trailer_entries=(trailer_entries : Array(Tuple(String, String))) #

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


[View source]