disabled loopback for upnp
This commit is contained in:
parent
2661f834fd
commit
fbac9f785a
|
@ -51,7 +51,7 @@ namespace libtorrent
|
|||
{
|
||||
public:
|
||||
broadcast_socket(asio::io_service& ios, udp::endpoint const& multicast_endpoint
|
||||
, receive_handler_t const& handler);
|
||||
, receive_handler_t const& handler, bool loopback = true);
|
||||
~broadcast_socket() { close(); }
|
||||
|
||||
void send(char const* buffer, int size, asio::error_code& ec);
|
||||
|
|
|
@ -69,7 +69,8 @@ namespace libtorrent
|
|||
|
||||
broadcast_socket::broadcast_socket(asio::io_service& ios
|
||||
, udp::endpoint const& multicast_endpoint
|
||||
, receive_handler_t const& handler)
|
||||
, receive_handler_t const& handler
|
||||
, bool loopback)
|
||||
: m_multicast_endpoint(multicast_endpoint)
|
||||
, m_on_receive(handler)
|
||||
{
|
||||
|
@ -102,7 +103,7 @@ namespace libtorrent
|
|||
if (ec) continue;
|
||||
s->set_option(hops(255), ec);
|
||||
if (ec) continue;
|
||||
s->set_option(enable_loopback(true), ec);
|
||||
s->set_option(enable_loopback(loopback), ec);
|
||||
if (ec) continue;
|
||||
m_sockets.push_back(socket_entry(s));
|
||||
socket_entry& se = m_sockets.back();
|
||||
|
|
|
@ -70,7 +70,7 @@ upnp::upnp(io_service& ios, connection_queue& cc
|
|||
, m_io_service(ios)
|
||||
, m_strand(ios)
|
||||
, m_socket(ios, udp::endpoint(address_v4::from_string("239.255.255.250"), 1900)
|
||||
, m_strand.wrap(bind(&upnp::on_reply, this, _1, _2, _3)))
|
||||
, m_strand.wrap(bind(&upnp::on_reply, this, _1, _2, _3)), false)
|
||||
, m_broadcast_timer(ios)
|
||||
, m_refresh_timer(ios)
|
||||
, m_disabled(false)
|
||||
|
|
Loading…
Reference in New Issue