Detaching Socket from HTTPSession
Opened this issue · 4 comments
Is there any safe way to detach folly::AsyncTransport from proxygen::HTTPSession without closing the socket?
I don't think there's currently a way to do this
Is there any possibility of implementing this in future?
What is it you are trying to do? Pass the underlying AsyncSocket off after an HTTP/1.x CONNECT?
Could you instead write an AsyncTransport implementation that uses HTTPTransaction/Handler to send/receive data? This has the benefit of working with HTTP/2 and 3 also.
After HTTP CONNECT, I am planning to detach the folly::AsyncTransport from the HTTPSession, and then just forward the data from both ends. And I have optimized that forwarding code similar to HTTPSession, where writes are sent at the end of each event base loop. And also control the amount of data that can be read over a single event base loop. I am stuck at detaching the AsyncTransport from HTTPSession.
Can you provide any example code for implementation of AsyncTransport that uses HTTPTransaction/Handler.