Added automated disconnect

This commit is contained in:
Torsten Schulz
2024-01-27 01:00:59 +01:00
parent e810a25f97
commit ffd01194da
2 changed files with 5 additions and 0 deletions

View File

@@ -58,6 +58,10 @@ App::App(const Wt::WEnvironment &env, Broadcast &server):
messageReceived_ = std::make_unique<Wt::WSound>("newmessage.mp3");
}
App::~App() {
server_.disconnect(this);
}
void App::initApp() {
setTitle("YP Direct Chat");
setCssTheme("");

View File

@@ -15,6 +15,7 @@ namespace Magick {
class App : public Wt::WApplication, public Client {
public:
App(const Wt::WEnvironment& env, Broadcast& server);
~App();
private:
std::unordered_map<std::string, std::string> genders_ {