28 #include <unordered_set> 29 #include <jsonrpccpp/server/abstractserverconnector.h> 33 template <
class S>
class IpcServerBase:
public jsonrpc::AbstractServerConnector
39 virtual bool SendResponse(std::string
const& _response,
void* _addInfo =
nullptr);
44 virtual size_t Write(
S _connection, std::string
const& _data) = 0;
45 virtual size_t Read(
S _connection,
void* _data,
size_t _size) = 0;
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
IpcServerBase(std::string const &_path)
virtual size_t Write(S _connection, std::string const &_data)=0
virtual bool SendResponse(std::string const &_response, void *_addInfo=nullptr)
virtual void CloseConnection(S _socket)=0
virtual size_t Read(S _connection, void *_data, size_t _size)=0
void GenerateResponse(S _connection)
std::thread m_listeningThread
virtual bool StopListening()
virtual bool StartListening()
std::unordered_set< S > m_sockets