Windows ws build fix
This commit is contained in:
		| @@ -21,6 +21,9 @@ | ||||
|  | ||||
| #ifndef _WIN32 | ||||
| #include <signal.h> | ||||
| #else | ||||
| #include <process.h> | ||||
| #define getpid _getpid | ||||
| #endif | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -9,13 +9,13 @@ | ||||
| // Broadcast server can be ran with `ws broadcast_server` | ||||
| // | ||||
|  | ||||
| #include "linenoise.hpp" | ||||
| #include "nlohmann/json.hpp" | ||||
| #include <ixwebsocket/IXSocket.h> | ||||
| #include <ixwebsocket/IXWebSocket.h> | ||||
| #include <queue> | ||||
| #include <spdlog/spdlog.h> | ||||
| #include <sstream> | ||||
| #include <iostream> | ||||
|  | ||||
| // for convenience | ||||
| using json = nlohmann::json; | ||||
| @@ -172,9 +172,10 @@ namespace ix | ||||
|         { | ||||
|             // Read line | ||||
|             std::string line; | ||||
|             auto quit = linenoise::Readline("> ", line); | ||||
|             std::cout << user << " > " << std::flush; | ||||
|             std::getline(std::cin, line); | ||||
|  | ||||
|             if (quit) | ||||
|             if (!std::cin) | ||||
|             { | ||||
|                 break; | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user