Merge branch 'RC_1_1'

This commit is contained in:
arvidn 2016-02-10 02:10:02 -05:00
commit 126ce22cb9
5 changed files with 29 additions and 19 deletions

View File

@ -85,6 +85,9 @@
* almost completely changed the storage interface (for custom storage)
* added support for hashing pieces in multiple threads
1.0.9 release
* python binding fix for boost-1.60.0
* optimize enumeration of network interfaces on windows
* improve reliability of binding listen sockets
* support SNI in https web seeds and trackers

View File

@ -198,7 +198,7 @@ void bind_alert()
using boost::noncopyable;
#ifndef TORRENT_NO_DEPRECATE
typedef boost::shared_ptr<alert> alert_holder;
#ifndef _MSC_VER
#if BOOST_VERSION >= 106000
register_ptr_to_python<boost::shared_ptr<alert> >();
#endif
#else

View File

@ -163,26 +163,25 @@ namespace libtorrent
// connections.
outgoing_interfaces,
// a comma-separated list of (IP or device name, port) pairs. These
// a comma-separated list of IP port-pairs. These
// are the listen ports that will be opened for accepting incoming uTP
// and TCP connections. It is possible to listen on multiple
// interfaces and multiple ports. Binding to port 0 will make the
// operating system pick the port. The default is "0.0.0.0:0", which
// binds to all interfaces on a port the OS picks.
// IPs and multiple ports. Binding to port 0 will make the
// operating system pick the port. The default is "0.0.0.0:6881", which
// binds to all interfaces on port 6881.
//
// if binding fails, the listen_failed_alert is posted, otherwise the
// listen_succeeded_alert.
// if binding fails, the listen_failed_alert is posted, potentially
// more than once. Once/if binding the listen socket(s) succeed,
// listen_succeeded_alert is posted.
//
// If the DHT is running, it will also have its socket rebound to the
// same port as the main listen port.
// Each port will attempt to open both a UDP and a TCP listen socket,
// to allow accepting uTP connections as well as TCP. If using the DHT,
// this will also make the DHT use the same UDP ports.
//
// The reason why it's a good idea to run the DHT and the bittorrent
// socket on the same port is because that is an assumption that may
// be used to increase performance. One way to accelerate the
// connecting of peers on windows may be to first ping all peers with
// a DHT ping packet, and connect to those that responds first. On
// windows one can only connect to a few peers at a time because of a
// built in limitation (in XP Service pack 2).
// Note::
// The current support for opening arbitrary UDP sockets is limited.
// In this version of libtorrent, there will only ever be two UDP
// sockets, one for IPv4 and one for IPv6.
listen_interfaces,
// when using a poxy, this is the hostname where the proxy is running

View File

@ -1499,6 +1499,8 @@ namespace libtorrent
// paused or auto_managed from the resume data
const bool m_override_resume_data:1;
#ifndef TORRENT_NO_DEPRECATE
#ifndef TORRENT_DISABLE_RESOLVE_COUNTRIES
// this is true while there is a country
// resolution in progress. To avoid flodding
// the DNS request queue, only one ip is resolved
@ -1508,6 +1510,8 @@ namespace libtorrent
// this is true if the user has enabled
// country resolution in this torrent
bool m_resolve_countries:1;
#endif
#endif
// set to false when saving resume data. Set to true
// whenever something is downloaded

View File

@ -49,6 +49,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/thread.hpp"
#include "libtorrent/random.hpp"
#include "libtorrent/torrent_info.hpp"
#include "libtorrent/broadcast_socket.hpp" // for supports_ipv6()
#include <boost/tuple/tuple.hpp>
#include <boost/bind.hpp>
@ -88,10 +89,13 @@ void init_rand_address()
address rand_v4()
{
do {
address_v4 ret;
do
{
g_addr += 0x3080ca;
} while (g_addr == 0);
return address_v4(g_addr);
ret = address_v4(g_addr);
} while (is_any(ret) || is_local(ret) || is_loopback(ret));
return ret;
}
sha1_hash rand_hash()