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

Unstable Https(secured) web socket Connection #1

Open
hamidrajabi opened this issue Jan 19, 2023 · 1 comment
Open

Unstable Https(secured) web socket Connection #1

hamidrajabi opened this issue Jan 19, 2023 · 1 comment

Comments

@hamidrajabi
Copy link

The Achex web-socket is an amazing and free service that can be used in so many projects.
However, I have a problem:
When I connect my esp8266 to the secured server (webSocket.beginSSL("ws.achex.ca", 443,"/")) I experience random and usual disconnections from the server.
I can amend the situation by reducing the reconnect interval (webSocket.setReconnectInterval(500)), but the disconnections still exist.
The secured achex web-socket server is pretty stable when I connect to it by the terminal on my computer but the webSocket.beginSSL("ws.achex.ca", 443,"/") on esp8266 is not!

@bangjii
Copy link
Owner

bangjii commented Jan 19, 2023

Hay hamid.. web socket implementation using esp8266 or any apps kita harus selalu menjaga koneksi agar selalu terjalin antara server dan client. Karena didalam web socket jika dalam kondisi idle koneksi akan terputus dengan sendirinya.

Issue ini memang berada pada web socket itu sendiri. Untuk mengatasi issue ini ada beberapa cara yang dapat dilakukan, salah satunya adalah membuat metode ping pong yaitu jika client ataupun server tidak dalam kondisi bertukar data maka timer akan berjalan dan akan mengirimkan ping!! Dimana disisi lain dibuatkan handler jika menerima message ping!! Maka send pong!!

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