support requesting UPnP and NAT-PMP routers for our external IP address

This commit is contained in:
Arvid Norberg
2010-12-05 20:40:28 +00:00
parent 2f115bc1aa
commit 779014ddac
10 changed files with 276 additions and 35 deletions

View File

@@ -193,11 +193,11 @@ struct callback_info
std::list<callback_info> callbacks;
void callback(int mapping, int port, error_code const& err)
void callback(int mapping, address const& ip, int port, error_code const& err)
{
callback_info info = {mapping, port, err};
callbacks.push_back(info);
std::cerr << "mapping: " << mapping << ", port: " << port
std::cerr << "mapping: " << mapping << ", port: " << port << ", IP: " << ip
<< ", error: \"" << err.message() << "\"\n";
//TODO: store the callbacks and verify that the ports were successful
}