Integration with websocket updates

Really tried to research it and read a lot of code, still can’t find the correct way of opening a WebSocket client to a cloud platform from within a HA integration code.
The integration I’m developing should receive updates via WebSocket, since doing this in threads is sort of out of the question due to the async nature of HA.
I need to find a way to integrate the WS client into the entity / update coordinator.
Couldn’t find a good code example, and the stuff I tried until now, result in errors.
Would really appreciate some help for this or at least to point me to some example.