From bbb551eb8ea93f53073c8c9822e0f5df8bec035d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 1 Nov 2009 03:13:50 +0000 Subject: [PATCH] docs fixes and regenerated html --- docs/manual.html | 65 ++++++++++++++++++++++++++++++++---------------- docs/manual.rst | 4 +-- 2 files changed, 46 insertions(+), 23 deletions(-) diff --git a/docs/manual.html b/docs/manual.html index 7f786facd..28181dcb6 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -75,7 +75,7 @@
  • set_peer_proxy() set_web_seed_proxy() set_tracker_proxy() set_dht_proxy()
  • peer_proxy() web_seed_proxy() tracker_proxy() dht_proxy()
  • set_i2p_proxy() i2p_proxy()
  • -
  • start_dht() stop_dht() set_dht_settings() dht_state()
  • +
  • start_dht() stop_dht() set_dht_settings() dht_state() is_dht_running()
  • add_dht_node() add_dht_router()
  • start_lsd() stop_lsd()
  • start_upnp() stop_upnp()
  • @@ -120,7 +120,7 @@
  • super_seeding()
  • add_piece()
  • read_piece()
  • -
  • force_reannounce()
  • +
  • force_reannounce() force_dht_announce()
  • scrape_tracker()
  • connect_peer()
  • name()
  • @@ -300,7 +300,7 @@ the session, it conta
  • start extensions (see add_extension()).

  • -
  • start DHT, LSD, UPnP, NAT-PMP etc (see start_dht() stop_dht() set_dht_settings() dht_state() +

  • start DHT, LSD, UPnP, NAT-PMP etc (see start_dht() stop_dht() set_dht_settings() dht_state() is_dht_running() start_lsd() stop_lsd(), start_upnp() stop_upnp() and start_natpmp() stop_natpmp())

  • parse .torrent-files and add them to the session (see bdecode() bencode() and add_torrent())

    @@ -487,6 +487,7 @@ class session: public boost::noncopyable , int> const& node); void add_dht_router(std::pair<std::string , int> const& node); + bool is_dht_running() const; void start_lsd(); void stop_lsd(); @@ -1244,14 +1245,15 @@ connection to it. The only used fields in the proxy settings structs are hostname and port.

    i2p_proxy returns the current i2p proxy in use.

    -
    -

    start_dht() stop_dht() set_dht_settings() dht_state()

    +
    +

    start_dht() stop_dht() set_dht_settings() dht_state() is_dht_running()

     void start_dht(entry const& startup_state);
     void stop_dht();
     void set_dht_settings(dht_settings const& settings);
     entry dht_state() const;
    +bool is_dht_running() const;
     

    These functions are not available in case TORRENT_DISABLE_DHT is @@ -1304,6 +1306,8 @@ before it is removed from the routing table. If there are known working nodes that are ready to replace a failing node, it will be replaced immediately, this limit is only used to clear out nodes that don't have any node that can replace them.

    +

    is_dht_running returns true if the DHT support has been started and false +otherwise.

    add_dht_node() add_dht_router()

    @@ -1964,6 +1968,7 @@ struct torrent_handle void save_resume_data() const; void force_reannounce() const; + void force_dht_announce() const; void force_reannounce(boost::posix_time::time_duration) const; void scrape_tracker() const; void connect_peer(asio::ip::tcp::endpoint const& adr, int source = 0) const; @@ -1971,9 +1976,9 @@ struct torrent_handle void set_tracker_login(std::string const& username , std::string const& password) const; - std::vector<announce_entry> const& trackers() const; + std::vector<announce_entry> trackers() const; void replace_trackers(std::vector<announce_entry> const&); - void add_tracker(announc_entry const& url); + void add_tracker(announce_entry const& url); void add_url_seed(std::string const& url); void remove_url_seed(std::string const& url); @@ -2272,17 +2277,19 @@ calling this function.

    Note that if you read multiple pieces, the read operations are not guaranteed to finish in the same order as you initiated them.

    -
    -

    force_reannounce()

    +
    +

    force_reannounce() force_dht_announce()

     void force_reannounce() const;
     void force_reannounce(boost::posix_time::time_duration) const;
    +void force_dht_announce() const;
     

    force_reannounce() will force this torrent to do another tracker request, to receive new peers. The second overload of force_reannounce that takes a time_duration as argument will schedule a reannounce in that amount of time from now.

    +

    force_dht_announce will announce the torrent to the DHT immediately.

    scrape_tracker()

    @@ -2510,7 +2517,7 @@ of the tracker announce. Set this if the tracker requires authorization.

    trackers() replace_trackers() add_tracker()

    -std::vector<announce_entry> const& trackers() const;
    +std::vector<announce_entry> trackers() const;
     void replace_trackers(std::vector<announce_entry> const&) const;
     void add_tracker(announc_entry const& url);
     
    @@ -2522,7 +2529,7 @@ which this tracker is tried. If you want libtorrent to use another list of trackers for this torrent, you can use replace_trackers() which takes a list of the same form as the one returned from trackers() and will replace it. If you want an immediate effect, you have to call -force_reannounce().

    +force_reannounce() force_dht_announce(). See trackers() for the definition of announce_entry.

    add_tracker() will look if the specified tracker is already in the set. If it is, it doesn't do anything. If it's not in the current set of trackers, it will insert it in the tier specified in the announce_entry.

    @@ -2592,7 +2599,7 @@ void set_priority(int prio) const; how much bandwidth its peers are assigned when distributing upload and download rate quotas. A high number gives more bandwidth. The priority must be within the range [0, 255].

    The default priority is 0, which is the lowest priority.

    -

    To query the priority of a torrent, use the `status()`_ call.

    +

    To query the priority of a torrent, use the torrent_handle::status() call.

    Torrents with higher priority will not nececcarily get as much bandwidth as they can consume, even if there's is more quota. Other peers will still be weighed in when bandwidth is being distributed. With other words, bandwidth is not distributed strictly @@ -4591,12 +4598,34 @@ public: virtual ~alert(); + virtual int type() const = 0; virtual std::string message() const = 0; virtual char const* what() const = 0; virtual int category() const = 0; virtual std::auto_ptr<alert> clone() const = 0; }; +

    type() returns an integer that is unique to this alert type. It can be +compared against a specific alert by querying a static constant called alert_type +in the alert. It can be used to determine the run-time type of an alert* in +order to cast to that alert type and access specific members.

    +

    e.g:

    +
    +std::auto_ptr<alert> a = ses.pop_alert();
    +switch (a->type())
    +{
    +        case read_piece_alert::alert_type:
    +        {
    +                read_piece_alert* p = (read_piece_alert*)a.get();
    +                // use p
    +                break;
    +        }
    +        case file_renamed_alert::alert_type:
    +        {
    +                // etc...
    +        }
    +}
    +

    what() returns a string literal describing the type of the alert. It does not include any information that might be bundled with the alert.

    category() returns a bitmask specifying which categories this alert belong to.

    @@ -4694,7 +4723,7 @@ appears there is no NAT router that can be remote controlled to add port mappings.

    mapping refers to the mapping index of the port map that failed, i.e. the index returned from add_mapping.

    -

    type is 0 for NAT-PMP and 1 for UPnP.

    +

    map_type is 0 for NAT-PMP and 1 for UPnP.

    error tells you what failed.

     struct portmap_error_alert: alert
    @@ -4722,7 +4751,7 @@ struct portmap_alert: alert
             // ...
             int mapping;
             int external_port;
    -        int type;
    +        int map_type;
     };
     
    @@ -4736,7 +4765,7 @@ for debugging the UPnP or NAT-PMP implementation.

    struct portmap_log_alert: alert { //... - int type; + int map_type; std::string msg; }; @@ -6856,12 +6885,6 @@ altogether. You can use:

    boost::filesystem::path::default_name_check(boost::filesystem::native);

    for example. For more information, see the Boost.Filesystem docs.

    -
    -
    -

    Docutils System Messages

    -
    -

    System Message: ERROR/3 (manual.rst, line 2534); backlink

    -Duplicate target name, cannot be used as a unique reference: "status()".