reorganize close/abort events in websockets
possible to set several event handlers