Proper move of App
This commit is contained in:
+4
-4
@@ -12,11 +12,11 @@ int main(int argc, char **argv) {
|
||||
int hello;
|
||||
};
|
||||
|
||||
uWS::SSLApp({
|
||||
auto app = uWS::SSLApp({
|
||||
.key_file_name = "/home/alexhultman/key.pem",
|
||||
.cert_file_name = "/home/alexhultman/cert.pem",
|
||||
.passphrase = "1234"
|
||||
}).get("/exit", [](auto *res, auto *req) {
|
||||
}).post("/exit", [](auto *res, auto *req) {
|
||||
|
||||
if (!token) {
|
||||
res->end("Server already closed down!");
|
||||
@@ -60,12 +60,12 @@ int main(int argc, char **argv) {
|
||||
PerSocketData *perSocketData = (PerSocketData *) ws->getUserData();
|
||||
std::cout << "OK per socket data: " << (perSocketData->hello == 13) << std::endl;
|
||||
}
|
||||
}).listen(9001, [](auto *token) {
|
||||
})/*.listen(9001, [](auto *token) {
|
||||
::token = token;
|
||||
if (token) {
|
||||
std::cout << "Listening on port " << 3000 << std::endl;
|
||||
}
|
||||
}).run();
|
||||
})*/.run();
|
||||
|
||||
|
||||
std::cout << "Everything fine, falling through" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user