When developing the data source plug-in, I want to update the data to display on the panel (instead of query function) using websocket, but I don't know how to do it. Who can help me?

When developing the datasource plug-in, I want to update the data to display on the panel (instead of query function) using websocket, but I don’t know how to do it. Who can help me?