diff --git a/docs/manual.html b/docs/manual.html index c067d9c72..ad6444b02 100755 --- a/docs/manual.html +++ b/docs/manual.html @@ -40,33 +40,35 @@
Functions that are yet to be implemented:
@@ -244,8 +248,8 @@ the session, it contains the mclass session: public boost::noncopyable { - session(int listen_port, const fingerprint& print); - session(int listen_port); + session(std::pair<int, int> listen_port_range, const fingerprint& print); + session(std::pair<int, int> listen_port_range); torrent_handle add_torrent( const torrent_info& t @@ -292,10 +296,12 @@ destructing the sessoin object. Because it can take a few second for it to finis timeout can be set with set_http_settings().The torrent_handle returned by add_torrent can be used to retrieve information about the torrent's progress, its peers etc. It is also used to abort a torrent.
-The constructor takes a listen port as argument, if the given port is busy it will +
The constructor takes a range of listen ports as argument, if the first port is busy it will increase the port number by one and try again. If it still fails it will continue -increasing the port number until it succeeds or has failed 9 ports. This will -change in the future to give more control of the listen-port.
+increasing the port number until it succeeds or has reached the end of the range. If it +fails with all ports, a listen_failed_alert will be posted and the session thread will +exit. The only thing you can do with your session if this alert is posted is to destruct +it and possibly try again or change the port range.For information about the pop_alert() function, see alerts.
The specific alerts, that all derives from alert, are:
+This alert is generated when none of the ports, given in the port range, to +session can be opened for listening. Without a listening port the session +object will exit its thread. This alert is generated as severity level fatal.
++struct listen_failed_alert: alert +{ + listen_failed_alert(const std::string& msg); + virtual std::auto_ptr<alert> clone() const; +}; ++
If the storage fails to read or write files that it needs access to, this alert is +generated and the torrent is aborted. It is generated as severity level fatal.
++struct file_error_alert: alert +{ + file_error_alert( + const torrent_handle& h + , const std::string& msg); + + virtual std::auto_ptr<alert> clone() const; + + torrent_handle handle; +}; ++
This alert is generated on tracker time outs, premature disconnects, invalid response or
@@ -1344,7 +1380,7 @@ int main(int argc, char* argv[])
try
{
- session s(6881);
+ session s(std::make_pair(6881, 6889));
std::ifstream in(argv[1], std::ios_base::binary);
in.unsetf(std::ios_base::skipws);
diff --git a/docs/manual.rst b/docs/manual.rst
index 34bdb6d07..c7282000c 100755
--- a/docs/manual.rst
+++ b/docs/manual.rst
@@ -44,6 +44,8 @@ The current state includes the following features:
* possibility to limit the number of connections.
* delays have messages if there's no other outgoing traffic to the peer, and doesn't
send have messages to peers that already has the piece. This saves bandwidth.
+ * Does not have any requirements on the piece order in a torrent that it resumes. This
+ means it can resume a torrent downloaded by any client.
__ http://home.elp.rr.com/tur/multitracker-spec.txt
.. _Azureus: http://azureus.sourceforge.net
@@ -1115,11 +1117,11 @@ object will exit its thread. This alert is generated as severity level ``fatal``
::
-struct listen_failed_alert: alert
-{
- listen_failed_alert(const std::string& msg);
- virtual std::auto_ptr