我有一个用Casablanca编写的小型HTTP服务器,我想获取发送请求的客户端的IP地址。我查看了http_request的成员,但找不到它。
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;
});