Windows ws build fix
This commit is contained in:
parent
8410a65754
commit
7e521e38ef
@ -21,6 +21,9 @@
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#else
|
||||||
|
#include <process.h>
|
||||||
|
#define getpid _getpid
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
// Broadcast server can be ran with `ws broadcast_server`
|
// Broadcast server can be ran with `ws broadcast_server`
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "linenoise.hpp"
|
|
||||||
#include "nlohmann/json.hpp"
|
#include "nlohmann/json.hpp"
|
||||||
#include <ixwebsocket/IXSocket.h>
|
#include <ixwebsocket/IXSocket.h>
|
||||||
#include <ixwebsocket/IXWebSocket.h>
|
#include <ixwebsocket/IXWebSocket.h>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
// for convenience
|
// for convenience
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
@ -172,9 +172,10 @@ namespace ix
|
|||||||
{
|
{
|
||||||
// Read line
|
// Read line
|
||||||
std::string 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;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user