Implement socket notifications on custom events

How can we implement socket popup notifications for example of chat in our app on custom events?

Hi

This thread refers to popup example cases of msgprint and task_progress custom events?