some more ASNum additions
This commit is contained in:
@@ -134,6 +134,7 @@ The ``session`` class has the following synopsis::
|
||||
|
||||
bool load_asnum_db(char const* file);
|
||||
bool load_country_db(char const* file);
|
||||
int as_for_ip(address const& adr);
|
||||
|
||||
void load_state(entry const& ses_state);
|
||||
entry state() const;
|
||||
@@ -421,18 +422,22 @@ their turn to get connected.
|
||||
``max_half_open_connections()`` returns the set limit. This limit defaults
|
||||
to 8 on windows.
|
||||
|
||||
load_asnum_db() load_country_db()
|
||||
---------------------------------
|
||||
load_asnum_db() load_country_db() int as_for_ip()
|
||||
-------------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
bool load_asnum_db(char const* file);
|
||||
bool load_country_db(char const* file);
|
||||
int as_for_ip(address const& adr);
|
||||
|
||||
These functions are not available if ``TORRENT_DISABLE_GEO_IP`` is defined. They
|
||||
expects a path to the `MaxMind ASN database`_ and `MaxMind GeoIP database`_
|
||||
respectively. This will be used to look up which AS and country peers belong to.
|
||||
|
||||
``as_for_ip`` returns the AS number for the IP address specified. If the IP is not
|
||||
in the database or the ASN database is not loaded, 0 is returned.
|
||||
|
||||
.. _`MaxMind ASN database`: http://www.maxmind.com/app/asnum
|
||||
.. _`MaxMind GeoIP database`: http://www.maxmind.com/app/geolitecountry
|
||||
|
||||
|
Reference in New Issue
Block a user