ZeroEQ  0.9.0
ZeroEQ - Zero Event Queue
helpers.h
1 
2 /* Copyright (c) 2017, Human Brain Project
3  * Stefan.Eilemann@epfl.ch
4  */
5 
6 #ifndef ZEROEQ_HTTP_HELPERS_H
7 #define ZEROEQ_HTTP_HELPERS_H
8 
9 #include <zeroeq/http/response.h>
10 
11 #include <future>
12 
13 namespace zeroeq
14 {
15 namespace http
16 {
21 template <typename... Args>
22 std::future<Response> make_ready_response(Args&&... args)
23 {
24  std::promise<Response> promise;
25  promise.set_value(Response(std::forward<Args>(args)...));
26  return promise.get_future();
27 }
28 }
29 }
30 
31 #endif
std::future< Response > make_ready_response(Args &&...args)
Definition: helpers.h:22
Response to an HTTP Request.
Definition: response.h:56
Publish-subscribe and request-reply.
Definition: client.h:10