Package wsevents supports an event model when using websockets.