how to use libwebsockets to send ping/pong?

I am subscribing depth_update data from websocket. i am using c++ library libwebsockets.

I found at the beginning, it works fine, but after 5 minutes, the connection broke.

i think it’s ping/pong issue?

could you let me know what should i do to maintain the connection?

The best would be reaching out to the mentioned library’s community to question about its usage.
Unfortunately, we can’t look into all programming questions here.