initial support for GeoIP (only AS mappings for now)
This commit is contained in:
@@ -68,6 +68,10 @@ void bind_peer_info()
|
||||
.def_readonly("num_hashfails", &peer_info::num_hashfails)
|
||||
#ifndef TORRENT_DISABLE_RESOLVE_COUNTRIES
|
||||
.add_property("country", get_country)
|
||||
#endif
|
||||
#ifndef TORRENT_DISABLE_GEO_IP
|
||||
.def_readonly("inet_as_name", &peer_info::inet_as_name)
|
||||
.def_readonly("inet_as", &peer_info::inet_as)
|
||||
#endif
|
||||
.def_readonly("load_balancing", &peer_info::load_balancing)
|
||||
.def_readonly("download_queue_length", &peer_info::download_queue_length)
|
||||
|
@@ -250,6 +250,11 @@ void bind_session()
|
||||
.def("set_pe_settings", allow_threads(&session::set_pe_settings), session_set_pe_settings_doc)
|
||||
.def("get_pe_settings", allow_threads(&session::get_pe_settings), return_value_policy<copy_const_reference>())
|
||||
#endif
|
||||
#ifndef TORRENT_DISABLE_GEO_IP
|
||||
.def("load_asnum_db", allow_threads(&session::load_asnum_db))
|
||||
#endif
|
||||
.def("load_state", allow_threads(&session::load_state))
|
||||
.def("state", allow_threads(&session::state))
|
||||
.def(
|
||||
"set_severity_level", allow_threads(&session::set_severity_level)
|
||||
, session_set_severity_level_doc
|
||||
|
Reference in New Issue
Block a user