postgres-websockets
postgres-websockets copied to clipboard
Need ping/pong functionality
The environment I use is a mobile network, and the connection is always unstable. Is it possible to provide the function of client PING and server response to PONG, which is convenient for the client to do heartbeat detection. Or is there already a similar function? thank you very much.
@cwangfr the server currently has no such feature. Just to ensure I understood correctly, you would like to initiate the ping test on the client side, is that correct?
@diogob yes, that's what i need
I wonder @cwangfr , could this be implemented in postgres? maybe using something like https://github.com/diogob/pg-recorder to listen for a PING message, and respond with a PONG
@jamesmstone @cwangfr that is a neat idea. It seems like the sort of functionality that would be well suited for a companion project. Perhaps we could even revamp the pg-recorder
project and bake some useful functions in the project. I won't have much time to dedicate to this project but I'm more than happy to review PRs and give any pointers needed.