Skip to content

Conversation

haga-rak
Copy link
Owner

@haga-rak haga-rak commented Apr 2, 2025

The goal of this refactoring is mainly to facilitate handling H2 connection from DownStream

@haga-rak haga-rak requested a review from Copilot April 2, 2025 13:25
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the main proxy orchestration pipeline to improve handling of H2 connections from DownStream. Key changes include replacing ILocalLink with IDownStreamPipe across multiple clients, introducing an ExchangeScope parameter in several method signatures, and updating asynchronous patterns (e.g. using direct task calls and memory pool allocation).

Reviewed Changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Fluxzy.Core/Core/ConnectionErrorHandler.cs Replaces exchangeInitResult with downStreamPipe and updates error message text.
src/Fluxzy.Core/Clients/Mock/MockedConnectionPool.cs Updates method signature to use IDownStreamPipe and adds an ExchangeScope parameter.
src/Fluxzy.Core/Clients/IRemoteConnectionBuilder.cs Refactors connection establishment to use connectResult and stream extraction from it.
src/Fluxzy.Core/Clients/IHttpConnectionPool.cs Adjusts Send method signature for downstream pipe and exchange scope.
src/Fluxzy.Core/Clients/H2/H2ConnectionPool.cs Removes Task.Run wrappers when starting internal read/write loops and updates buffer handling.
src/Fluxzy.Core/Clients/H11/* Updates Send and Process methods to adopt IDownStreamPipe and ExchangeScope.
src/Fluxzy.Core/Clients/DotNetBridge/* Introduces and disposes ExchangeScope in Http handlers.
src/Fluxzy.Core.Pcap/* Refactors connection provider and connection classes for improved capture context handling.
Comments suppressed due to low confidence (3)

src/Fluxzy.Core/Core/ConnectionErrorHandler.cs:170

  • The word "occured" is misspelled. Please update it to "occurred".
var message = "A configuration error has occured.\r\n";

src/Fluxzy.Core/Clients/Mock/MockedConnectionPool.cs:42

  • [nitpick] The parameter name '__' is unclear and may lead to confusion; consider using '_' to denote an unused parameter or a more descriptive name if it has a purpose.
ExchangeScope __,

src/Fluxzy.Core/Clients/H2/H2ConnectionPool.cs:118

  • Removing Task.Run may change the scheduling and error propagation behavior of the read loop. Confirm that executing the loop directly (without Task.Run) is intentional and does not adversely affect concurrency or exception handling.
_innerReadTask = InternalReadLoop(_connectionToken);

@haga-rak haga-rak added the chore label Apr 2, 2025
@haga-rak haga-rak merged commit 727fe4e into main Apr 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant