If I have a basic handler along the lines of the one in
hello_world_server.cpp
struct hello_world {
/*<< This is the function that handles the incoming request. >>*/
void operator() (server::request const &request,
server::response &response) {
response = server::response::stock_reply(
server::response::ok, "Hello, World!");
}
/*<< It's necessary to define a log function, but it's ignored in
this example. >>*/
void log(...) {
// do nothing
}
};
is there any easy way to retrieve the client ip address, and the ip
address and port that the request arrived on?
Thanks
Erik
|