graceful disconnect mode which finishes transactions before disconnecting peers
This commit is contained in:
@@ -1955,7 +1955,8 @@ Its declaration looks like this::
|
||||
|
||||
void use_interface(char const* net_interface) const;
|
||||
|
||||
void pause() const;
|
||||
enum pause_flags_t { graceful_pause = 1 };
|
||||
void pause(int flags = 0) const;
|
||||
void resume() const;
|
||||
bool is_paused() const;
|
||||
bool is_seed() const;
|
||||
@@ -2393,7 +2394,8 @@ pause() resume() is_paused()
|
||||
|
||||
::
|
||||
|
||||
void pause() const;
|
||||
enum pause_flags_t { graceful_pause = 1 };
|
||||
void pause(int flags) const;
|
||||
void resume() const;
|
||||
bool is_paused() const;
|
||||
|
||||
@@ -2403,6 +2405,12 @@ all potential (not connected) peers. You can use ``is_paused()`` to determine if
|
||||
is currently paused. Torrents may be paused automatically if there is a file error (e.g. disk full)
|
||||
or something similar. See file_error_alert_.
|
||||
|
||||
The ``flags`` argument to pause can be set to ``torrent_handle::graceful_pause`` which will
|
||||
delay the disconnect of peers that we're still downloading outstanding requests from. The torrent
|
||||
will not accept any more requests and will disconnect all idle peers. As soon as a peer is
|
||||
done transferring the blocks that were requested from it, it is disconnected. This is a graceful
|
||||
shut down of the torrent in the sense that no downloaded bytes are wasted.
|
||||
|
||||
torrents that are auto-managed may be automatically resumed again. It does not make sense to
|
||||
pause an auto-managed torrent without making it not automanaged first. Torrents are auto-managed
|
||||
by default when added to the session. For more information, see queuing_.
|
||||
|
Reference in New Issue
Block a user