-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (20 loc) · 770 Bytes
/
main.cpp
File metadata and controls
29 lines (20 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <thread>
#include <iostream>
#include "discord_listener.h"
#include "webhook_server.h"
int main() {
std::thread discord_thread(startDiscordClient);
std::cout << "Discord client is running..." << std::endl;
std::thread webhook_thread([]() {
webhook::TcpServer server = webhook::TcpServer("0.0.0.0", 8080);
std::cout << "Webhook server is running..." << std::endl;
});
std::cout << "Joining Webhook thread...\n";
webhook_thread.join();
std::cout << "Webhook thread joined.\n";
std::cout << "Joining Discord thread...\n";
discord_thread.join();
std::cout << "Discord thread joined.\n";
std::cout << "Both Discord client and webhook server have stopped." << std::endl;
return 0;
}