Peer list is now divided into 2: unusedPeers_ and usedPeers_.
Duplicate check is done using std::set by comparing pair of IP address
and port. For this, only IP address and port given to the Peer
constructor are used. In other words, TCP port received from extended
message is not used for this purpose.
In InitiatorMSEHandshakeCommand, when aborting connection, we must
return peer to the PeerStorage. But it is not done if sequence_ is
INITIATOR_SEND_KEY. This causes stale Peer objects whose usedBy()
returns true eventually occupies peer list and aria2 cannot make any
connections.
--save-session-interval option saves error/unfinished downloads to a
file specified by --save-session option every SEC seconds. If 0 is
given, file will be saved only when aria2 exits.
On Mingw32 build, if aria2 opens file with GENERIC_WRITE access right,
some programs cannot open the file aria2 is seeding. To avoid this
situation, re-open files with read-only enabled when seeding is about
to begin.
This option sets GID manually. aria2 identifies each download by the
ID called GID. The GID must be hex string of 16 characters, thus
[0-9a-zA-Z] are allowed and leading zeros must not be stripped. The
GID all 0 is reserved and must not be used. The GID must be unique,
otherwise error is reported and the download is not added. This
option is useful when restoring the sessions saved using
--save-session option. If this option is not used, new GID is
generated by aria2.
This change replaces the current 64 bit sequential GID with 64 bits
random bytes GID in an attempt to support persistent GID. Internally,
the GID is stored as uint64_t. For human representation and RPC
interface, GID is represented as 16 bytes hex string. For console
readout, 16 bytes are too long, so it is abbreviated to first 6 bytes.
When querying GID in RPC calls, user can speicfy the prefix of GID as
long as the prefix is shared by more than 1 GID entries.