19 #ifndef __RECURSIVESERVER_H__
20 #define __RECURSIVESERVER_H__
23 #include "datastore.h"
24 #include "recursiveparams.h"
25 #include "percyserver.h"
45 const std::vector<std::iostream*> &workers =
46 std::vector<std::iostream*>());
49 virtual bool handle_request_impl (
50 const std::vector<unsigned char*> &requests,
51 const std::vector<unsigned char*> &responses);
53 virtual bool handle_request_distributed (
54 const std::vector<unsigned char*> &requests,
55 const std::vector<unsigned char*> &responses,
56 const std::vector<std::iostream*> &workers);
58 virtual bool handle_request_threaded (
59 const std::vector<unsigned char*> &requests,
60 const std::vector<unsigned char*> &responses);
62 virtual void combine_results (
unsigned char * result,
63 const std::vector<unsigned char*> &worker_results);
68 std::vector<DataStore*> iteration_datastores;
69 std::vector<PercyServer*> iteration_servers;
71 bool handle_request_worker (std::istream& is, std::ostream&os);
Definition: recursiveparams.h:24
Definition: percystats.h:66
A simple database object.
Definition: datastore.h:34
virtual bool handle_request(std::istream &is, std::ostream &os, const std::vector< std::iostream * > &workers=std::vector< std::iostream * >())
Handle a request from a single client.
virtual ~RecursiveServer()
Destructor.
PercyStats * stats
Statistics collection object.
Definition: percyserver.h:141
An abstract base class for a PIR server.
Definition: percyserver.h:34
RecursiveServer(DataStore *datastore, const RecursiveServerParams *serverparams, PercyStats *stats=NULL)
Constructor.
A PIR server for recursive PIR protocols.
Definition: recursiveserver.h:31
DataStore * datastore
The database used by the server.
Definition: percyserver.h:137
Definition: recursiveparams.h:102