set callback to be invoked when the websocket connection is closed.
virtual void onClosed(std::function<void()> callback) = 0
callback: