Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detaching Socket from HTTPSession #530

Open
SteveSelva opened this issue Nov 6, 2024 · 4 comments
Open

Detaching Socket from HTTPSession #530

SteveSelva opened this issue Nov 6, 2024 · 4 comments
Labels

Comments

@SteveSelva
Copy link
Contributor

Is there any safe way to detach folly::AsyncTransport from proxygen::HTTPSession without closing the socket?

@hanidamlaj
Copy link
Contributor

I don't think there's currently a way to do this

@SteveSelva
Copy link
Contributor Author

Is there any possibility of implementing this in future?

@afrind
Copy link
Contributor

afrind commented Nov 22, 2024

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.

@SteveSelva
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants