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

convert the TCP proxy to use the protocols and upgrade system #284

Closed
Geal opened this issue Dec 4, 2017 · 2 comments
Closed

convert the TCP proxy to use the protocols and upgrade system #284

Geal opened this issue Dec 4, 2017 · 2 comments

Comments

@Geal
Copy link
Member

Geal commented Dec 4, 2017

That way, we could have a first protocol implementing the "proxy protocol", then upgrading to the pipe one, and have only one implementation of this (currently the TCP proxy has its own implementation of piping data back and forth)

@NotBad4U
Copy link
Contributor

Hello,
I understand that first thing to do, it's to add Pipe to the Tcp Client. And that has to work like the Pipe in Http client.

But what I don't understand is how can we add this, without creating the upgrade method itself.
The Pipe is create in the Http::Client during a back_readable when a ProtocolResult::Upgrade is read. But the back_readable of Tcp::Client doesn't seem to follow the same behavior.
Thank in advance for your help 😄

@Geal
Copy link
Member Author

Geal commented Dec 12, 2017

for http, it is done in back_readable because we might upgrade from HTTP when the server answered a Connection: Upgrade. For TCP, no need to implement upgrade, you can create the Pipe right from the beginning

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

No branches or pull requests

2 participants