I have a small HTTP server written using Casablanca, and I would like to get the IP address of the client who sent the request. I looked at the members of http_request and could not find it.
web::http::experimental::listener::http_listener listener(U("http://*/http_server")); listener.support(web::http::methods::POST, [](web::http::http_request const& request) { std::cout << "client: " << "[ip address]" << " requested " << request << std::endl; });
source share