summary refs log tree commit diff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp

index bd4ebbec..372eaa00 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -30,16 +30,18 @@ int main(int argc, char **argv){ auto mongoHandler = std::make_unique<mongoStub>(); mongocxx::options::change_stream options; + //voiceEvents collection watcher mongocxx::change_stream colCs = mongoHandler->getCol().watch(options); + std::cout << "Server created and listening for events" << std::endl; + //Check for new messages in the collection for (;;){ - std::vector<std::string> t = mongoHandler->getNewMessages(&colCs); + std::vector<mongoStub::mongoMessage> t = mongoHandler->getNewMessages(&colCs); for(auto &i : t){ - std::cout << i << std::endl; + std::cout << "[" << i.eventName << "] " << std::endl; } } - std::cout << "Server created" << std::endl; return 0; } \ No newline at end of file