#include <Wt/WApplication.h>
#include <Wt/WContainerWidget.h>
#include <Wt/WEnvironment.h>
#include <Wt/WPushButton.h>
#include <Wt/WServer.h>
#include <Wt/WText.h>
#include <Wt/WTimer.h>
#include "SimpleChatServer.h"
#include "PopupChatWidget.h"
Go to the source code of this file.
◆ createApplication()
Definition at line 142 of file simpleChat.C.
144{
145 return std::make_unique<ChatApplication>(env, server);
146}
◆ createWidget()
Definition at line 148 of file simpleChat.C.
149{
150 return std::make_unique<ChatWidget>(env, server);
151}
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 153 of file simpleChat.C.
154{
155 Wt::WServer server(argc, argv, WTHTTP_CONFIGURATION);
157
158
159
160
161
162 server.addEntryPoint(Wt::EntryPointType::Application,
164 std::ref(chatServer)));
165 server.addEntryPoint(Wt::EntryPointType::WidgetSet,
167 std::ref(chatServer)), "/chat.js");
168
169 if (server.start()) {
171 std::cerr << "Shutting down: (signal = " << sig << ")" << std::endl;
172 server.stop();
173 }
174}
std::unique_ptr< WApplication > createApplication(const WEnvironment &env)
static WT_API int waitForShutdown()
std::unique_ptr< Wt::WApplication > createWidget(const Wt::WEnvironment &env, SimpleChatServer &server)