Added a function to listen an event on every socket