simplify websocket event handler reg