Created
September 25, 2012 12:58
-
-
Save deanberris/3781640 to your computer and use it in GitHub Desktop.
Using std::future<response> for responses to client requests.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace http = network::http; | |
std::future<http::response> response_future = | |
client.get("http://www.google.com/"); // returns immediately | |
http::response actual_response = | |
response_future.get(); // will move instead of copy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment