используйте blog._slug
вместо blog.slug.
, потому что мангуст извлекает "id"
как collections._id
Сокет имеет функцию, которая получит удаленную конечную точку. Я дал бы эту (длинноватую) цепочку команд движение, они должны получить строковое представление IP-адреса удаленного конца:
asio::ip::tcp::socket socket(io_service);
// Do all your accepting and other stuff here.
asio::ip::tcp::endpoint remote_ep = socket.remote_endpoint();
asio::ip::address remote_ad = remote_ep.address();
std::string s = remote_ad.to_string();
или версия остроты:
asio::ip::tcp::socket socket(io_service);
// Do all your accepting and other stuff here.
std::string s = socket.remote_endpoint().address().to_string();