My app (websocket libnopoll) send PING frame to future stream server and does not get PONG back. After sending PING data flow gets stopped.
The same problem when my app does not send PING but data flow gets frozen at the moment when Binance server sends PING.
BUT my app connects to Binance spot websocket stream and it works properly sending PING and receiving PONG back. Also server send PING and my app returns PONG.
Could you say what is difference between PING/PONG code of SPOT and FUTURES websocket implementations?
Thanks for feedback, we can confirm that futures websocket server respond pong when receive ping message.
the problem is that data flow gets stopped when fstream.finance.com:443(server of futures) sends PING to my application but quote flow does NOT get frozen when stream.binance.com:9443 (spot server) PING my client app.
Please, compare PING/PONG code of SPOT and FUTURES servers and if there is some difference then translate PING/PONG approach to server of futures.
Thanks in advance for your attention.
I found on this forum that some other programmers complain on futures’ data flow. It gets frozen and PING msg does not come from server.
I resolved problem. I downloaded up-to-date source code of “WS nopoll lib” and compiled it. After that PING/PONG work with futures too.
But it was strange that old compiled lib worked with “ping<->pong” properly with SPOT server and did not work with FUTURES.
Now a log file of WS nopoll lib shows correct PING from server and answer PONG:
23:02:50.213 futures :: receiving msg loop started
23:06:48.752 nopoll_conn.c:3466 PING received over connection id=2, replying PONG
23:11:48.844 nopoll_conn.c:3466 PING received over connection id=2, replying PONG
23:16:48.746 nopoll_conn.c:3466 PING received over connection id=2, replying PONG
23:21:48.754 nopoll_conn.c:3466 PING received over connection id=2, replying PONG
So ping every 5 min