class GRPC::Transport::GrpcDeframer

Overview

GrpcDeframer incrementally accumulates DATA chunks and extracts complete gRPC messages while preserving any trailing partial frame bytes.

Defined in:

grpc/transport/grpc_deframer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(encoding : String | Nil = nil, validate_encoding : Bool = false, limits : ReceiveLimits = ReceiveLimits.new) #

[View source]

Instance Method Detail

def append(chunk : Bytes) : Nil #

[View source]
def drain_frames : Array(Tuple(Bytes, Int32)) #

Preserve the wire size for HTTP/2 credit, including compressed frames.


[View source]
def drain_messages : Array(Bytes) #

[View source]
def each_frame(& : Bytes, Int32 -> ) : Nil #

Yield one decoded frame at a time so consumers can enforce their own backlog budget before a whole coalesced batch is decompressed.


[View source]
def encoding : String | Nil #

[View source]
def encoding=(encoding : String | Nil) #

[View source]
def remainder_size : Int32 #

[View source]