elephant.io icon indicating copy to clipboard operation
elephant.io copied to clipboard

keep-alive connection does not work

Open moofik opened this issue 6 years ago • 4 comments

Hello, I tried to use elephant.io v2 client as a PHP client that can establish keep-alive connection with my nodejs server thru websocket protocol, but connection closes automatically after some period of inactivity. Is there any possibility to open and support keep-alive connection? Please help.

moofik avatar May 06 '19 07:05 moofik

Thank you for your reply.

Could you provide sample code you execute?

And we can look at that about keep-alive connection.

peter279k avatar May 10 '19 16:05 peter279k

I have same question, how to get a keep-alive connection?

yufewell avatar Oct 22 '19 14:10 yufewell

Have you tried to call the keepAlive method (only on v1 or v2) periodically ? It's currently the only way, as PHP doesn't really have any way to make an async ping in the same request...

Taluu avatar Oct 22 '19 20:10 Taluu

Have you tried to call the keepAlive method (only on v1 or v2) periodically ? It's currently the only way, as PHP doesn't really have any way to make an async ping in the same request...

I installed package with composer and I find that the code is not same with the code in github. I checkout from github and copy to my project, now is ok. Very Very Thank You. My Best Wishes!

yufewell avatar Oct 23 '19 12:10 yufewell