34 WindowsPipeServer::WindowsPipeServer(
string const& _appId):
39 void WindowsPipeServer::CloseConnection(HANDLE _socket)
41 ::CloseHandle(_socket);
44 size_t WindowsPipeServer::Write(HANDLE _connection, std::string
const& _data)
47 ::WriteFile(_connection, _data.data(), _data.size(), &written ,
nullptr);
51 size_t WindowsPipeServer::Read(HANDLE _connection,
void* _data,
size_t _size)
54 ::ReadFile(_connection, _data, _size, &read,
nullptr);
58 void WindowsPipeServer::Listen()
62 HANDLE socket = CreateNamedPipe(
67 PIPE_UNLIMITED_INSTANCES,
74 m_sockets.insert(socket);
76 if (ConnectNamedPipe(socket,
nullptr) != 0)
78 std::thread
handler([
this, socket](){ GenerateResponse(socket); });
84 m_sockets.erase(socket);
bool(* handler)(HTTPRequest *req, const std::string &strReq)
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
std::hash for asio::adress
bool read(const std::string &s, Value &value)
if(a.IndicesBefore(b, len, lenIndices))
#define DEV_GUARDED(MUTEX)
Simple block guard.