Skip to content

Add connection management for H/2#10

Merged
srikrsna-buf merged 4 commits into
mainfrom
sk/http2
Feb 13, 2025
Merged

Add connection management for H/2#10
srikrsna-buf merged 4 commits into
mainfrom
sk/http2

Conversation

@srikrsna-buf

Copy link
Copy Markdown
Member

Add connection management for H/2. This adds an abstraction and a default implementation for managing (reusing) HTTP/2 connections across requests.

The keep alive logic is similar to the ones found in other connect implementations and exposes similar options to tweak the behavior.

Unfortunately this also introduces a minor breaking change for users using H/2 with TLS, they will have to pass the security context in a slightly different way:

- createHttpClient(context: context);
+ createHttpClient(
+   transport: Http2ClientTransport(
+     context: context,
+   ),
+ );

Not super happy with the name Http2ClientTransport as we use Transport for protocols.

Signed-off-by: Sri Krishna <skrishna@buf.build>
Signed-off-by: Sri Krishna <skrishna@buf.build>
Signed-off-by: Sri Krishna <skrishna@buf.build>
@srikrsna-buf srikrsna-buf requested a review from smaye81 February 12, 2025 01:37
@srikrsna-buf srikrsna-buf merged commit 989a37c into main Feb 13, 2025
@srikrsna-buf srikrsna-buf deleted the sk/http2 branch February 13, 2025 10:58
@srikrsna-buf srikrsna-buf mentioned this pull request Feb 14, 2025
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.

2 participants