main.cpp 491 B

12345678910111213141516171819
  1. #include <iostream>
  2. #include <sys/stat.h>
  3. #include "httpserver/http-server.h"
  4. #include "utils/utils.h"
  5. #include "processor/processor.h"
  6. using namespace xc;
  7. using namespace xc::httpserver;
  8. using namespace xc::processor;
  9. int main() {
  10. std::cout << "Hello, World!" << std::endl;
  11. HTTPServer server(8192);
  12. thread([&server] { server.serverLoop(); }).detach();
  13. RequestProcessWorker worker;
  14. thread([&worker] { worker.workerLoop(); }).detach();
  15. while (true) usleep(1000);
  16. }