Is there a best practice that can receive and handle custom events when polling a socket event

This is a duplicated post from other forum. So delete it.

When you post a comment in multiple places, please include a link in either direction so people don't waste their time writing an answer to something that has already been answered. other link

Sorry, this post was automatically blocked by the system (I noticed it indicated it was in a pending status) and I thought it couldn't be posted. I will now delete it.