Adding mechanism to send events through websockets