generically wrap all emit events for websocket