Skip to content

Introduce a client to server half close frame. - #309

Merged
vietj merged 1 commit into
mainfrom
protocol-updates
Aug 20, 2026
Merged

Introduce a client to server half close frame.#309
vietj merged 1 commit into
mainfrom
protocol-updates

Conversation

@vietj

@vietj vietj commented Aug 20, 2026

Copy link
Copy Markdown
Member

Motivation:

The internal client to server grpc frame protocol uses on the stream end to signal while the server to client uses a trailer frame.

That makes the protocol asymetric and implies to specially handle the stream end instead of relying on the sequence of frames.

The grpc protocol binding for HTTP/2 specifies an EOS, that we can reify as an hafl close frame.

Changes:

Introduce a GrpcHalfCloseFrame that signals the last frame sent by the stream.

The GrpcFrameType#TRAILERS is renamed to HALF_CLOSE.

The GrpcTrailersFrame extends GrpcHalfCloseFrame.

GrpcStream implementations have been updated accordingly.

GrpcReadStream/GrpcWriteStream have been updated accordingly.

@vietj vietj added this to the 5.2.0 milestone Aug 20, 2026
@vietj
vietj force-pushed the protocol-updates branch from 4a1b201 to f9023fe Compare August 20, 2026 11:03
Motivation:

The internal client to server grpc frame protocol uses on the stream end to signal while the server to client uses a trailer frame.

That makes the protocol asymetric and implies to specially handle the stream end instead of relying on the sequence of frames.

The grpc protocol binding for HTTP/2 specifies an EOS, that we can reify as an hafl close frame.

Changes:

Introduce a GrpcHalfCloseFrame that signals the last frame sent by the stream.

The GrpcFrameType#TRAILERS is renamed to HALF_CLOSE.

The GrpcTrailersFrame extends GrpcHalfCloseFrame and carries the necessary baggage for trailers.

GrpcStream implementations have been updated accordingly.

GrpcReadStream/GrpcWriteStream have been updated accordingly.
@vietj
vietj force-pushed the protocol-updates branch from f9023fe to 7bff0e1 Compare August 20, 2026 11:15
@vietj
vietj merged commit 369827b into main Aug 20, 2026
6 checks passed
@vietj
vietj deleted the protocol-updates branch August 20, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant