-
Notifications
You must be signed in to change notification settings - Fork 160
feat(websocket): allow using external TCP transport handle (IDFGH-12825) #573
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
feat(websocket): allow using external TCP transport handle (IDFGH-12825) #573
Conversation
Any updates on this...? |
any updates...? @gabsuren |
@huming2207 Thank you for your contribution, and we apologize for the delayed response. We are looking into it and will update you soon. |
@gabsuren any updates? it's been a month... |
@huming2207 this is in our pipeline for evaluation as Suren mentioned. Also we need you to install the pre-commit hook as explained in our contributing guide and fix the issues. |
Just to clarify, it seems like
Sure, I will do that. Regards, |
Also, just to be clear, this PR is solely for adding parent transport support, so that we are able to connect our stuff over a HTTP proxy provided by our partner companies. We don't need to, and better off not to touch the WS transport itself. Because that's not our use case at all. |
Not exactly the same way. MQTT client uses the external transport as is, not the base parent, as your proposal. In MQTT client, we don't even construct the About the cleanup, we want to keep the transport valid as long as the client is in use and simplify user task on tracking the lifetime of the transport, but it is not what I'm suggesting here. We might even go back on that decision for mqtt client.
I understand that this is your use case, and to be honest, probably the most common use case but, we need to provide the feature for the general case. And given that the workaround of constructing the websocket transport is just 1 or 2 extra lines it is better to do it that way. |
Ah crap, yes I misread the code. I will modify the code accordingly, |
d1e7bee
to
bced9ea
Compare
bced9ea
to
83ea287
Compare
I've committed the changes. Please re-review. Thanks. |
Thanks for the approval, but it seems like the CI is failing because of lacking heaeders in the logging library? Should I provide a workaround or wait till you fix it? |
@huming2207 the failure is unrelated to your PR. I will fix it separately. Thank you for contribution! |
Hi there,
This PR was originally done last year (May 2023), but I forgot to submit it... 😅
Anyway, this PR is for adding support to let WebSocket client to take external handles, similar to my another PR for MQTT client, see:
This is very useful for scenarios where:
transport_socks_proxy.c
intcp_transport
component) ;Currently for my company, we are using my HTTP proxy library mentioned above to achieve HTTP proxy access feature. But we are currently using my modified
esp-websocket-client
and we wish to merge this into mainline soon instead.Please provide suggestion if there's any and I will modify accordingly. Thanks.
Regards,
Jackson