davidfowl / BedrockFramework

High performance, low level networking APIs for building custom servers and clients.
MIT License
1.05k stars 153 forks source link

DuplexPipeStream and Adapter Access #162

Open AJK74 opened 1 year ago

AJK74 commented 1 year ago

Hi ,

+1 from me on BedrockFramework.

My use case is part of a SaaS solution where Bedrock allows me to build an application specific gateway on the same stack as other services. I'm using Yarp at the edge to handle multi-tenant routing for similar reasons.

Question

Is there a reason why DuplexPipeStream and the DuplexPipeStreamAdapter are limited to internal scope ?

My use case includes support for PostgreSQL wire protocol which starts out without TLS but can turn it on during startup negotiation.

To do this i've created some middleware to add a DuplexPipeStreamAdapter to the start of the pipeline - this then allows me to advance the transport before starting TLS negotiation.

Maybe there is another way to do that? A branching duplex pipe / duplex pipe with a bypass would be handy I guess.

Thanks

PS - I'd appreciate a line or two on what the latest status of the project is.