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

Allow to set TCP timeout manually #441

Open
mdivkovic opened this issue Jun 5, 2019 · 2 comments
Open

Allow to set TCP timeout manually #441

mdivkovic opened this issue Jun 5, 2019 · 2 comments

Comments

@mdivkovic
Copy link

Consider this an enhancement request. I'm using this library in communication between an ESP8285 as the WebSocket server and an Android device as the client. The devices need to communicate with each other through the WiFi hotspot of the Android device.

It turns out, for some Android devices (e.g. Samsung Galaxy S8 running Android 9), a client->tcp->write occasionally takes longer than 2 seconds, causing a partial frame being sent and an invalid header of the next frame received on the Android side, which results in Android WebSockets libraries closing the connection, in accordance with the RFC.

I've changed WEBSOCKETS_TCP_TIMEOUT to a larger value and the problem has disappeared, but it would be nice if I could set the timeout without changing the library source code.

@ramapcsx2
Copy link

Seconded.
It would be extremely helpful to define client TCP timeouts from outside the library.
In my case, I can deal with broken pipes on the website / JS, but I can't deal with the 2 second MCU stalls well.
I would want to reduce the TCP timeout, either per client or globally for all clients.

@sovcik
Copy link
Contributor

sovcik commented Mar 14, 2020

solved in #501

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

3 participants