V
V
vikholodov2018-07-17 10:34:11
Nginx
vikholodov, 2018-07-17 10:34:11

How to set up periodic sending of WebSocket ping frames to reset the timeout and check if the connection is working?

Good morning everyone.
I ran into the problem of breaking the websocket connection, as it turned out, due to proxying of Angie, I did it according to this manual nginx.org/ru/docs/http/websocket.html, where at the very end it says:

By default, the connection will be closed if no data has been transmitted from the proxied server for 60 seconds. This timeout can be increased using the proxy_read_timeout directive. In addition, the proxied server can be configured to periodically send WebSocket ping frames to reset the timeout and check if the connection is working.

It's understandable to increase the timeout, but I didn't really understand what "configure periodic sending of WebSocket ping frames" means. The first thing that came to my mind was to transfer some kind of phantom data in the background between users, but this seems like a crutch. Basically, I need your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2018-07-17
@Wexter

https://developer.mozilla.org/en-US/docs/Web/API/W...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question