mirror of
https://github.com/monero-project/monero.git
synced 2025-05-05 14:15:00 -04:00
epee: adaptive connection timeout system
a connection's timeout is halved for every extra connection from the same host. Also keep track of when we don't need to use a connection anymore, so we can close it and free the resource for another connection. Also use the longer timeout for non routable local addresses.
This commit is contained in:
parent
8a7b3ff138
commit
55c7fb87a9
6 changed files with 77 additions and 19 deletions
|
@ -150,6 +150,7 @@ namespace
|
|||
}
|
||||
|
||||
virtual bool close() { /*std::cout << "test_connection::close()" << std::endl; */return true; }
|
||||
virtual bool send_done() { /*std::cout << "test_connection::send_done()" << std::endl; */return true; }
|
||||
virtual bool call_run_once_service_io() { std::cout << "test_connection::call_run_once_service_io()" << std::endl; return true; }
|
||||
virtual bool request_callback() { std::cout << "test_connection::request_callback()" << std::endl; return true; }
|
||||
virtual boost::asio::io_service& get_io_service() { std::cout << "test_connection::get_io_service()" << std::endl; return m_io_service; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue