29struct HandleRequestFunctionWrapper::Data {
31 void* reference =
nullptr;
39 if (destructionCallback) {
40 destructionCallback(reference);
45 : handleRequestFunction(std::move(handleRequestFunction)), reference(reference),
46 destructionCallback(std::move(destructionCallback)) {}
54 data = make_unique<Data>(std::move(handleRequestFunction), reference, std::move(destructionCallback));
58 return data->handleRequestFunction(connection);
Function wrapper for handleRequest functions of nawa apps.
int operator()(nawa::Connection &connection) const
#define NAWA_DEFAULT_DESTRUCTOR_IMPL(Class)
std::function< void(void *)> DestructionCallbackFunction
std::function< int(nawa::Connection &)> HandleRequestFunction