IPv6 fixes

This commit is contained in:
Arvid Norberg 2007-02-27 17:21:46 +00:00
parent 7be41a5c8a
commit c40a75f844
3 changed files with 5 additions and 4 deletions

View File

@ -268,8 +268,9 @@ namespace libtorrent { namespace dht
void dht_tracker::rebind(asio::ip::address listen_interface, int listen_port)
{
m_socket.close();
m_socket.open(asio::ip::udp::v4());
m_socket.bind(udp::endpoint(listen_interface, listen_port));
udp::endpoint ep(listen_interface, listen_port);
m_socket.open(ep.protocol());
m_socket.bind(ep);
}
void dht_tracker::tick(asio::error_code const& e)

View File

@ -2010,7 +2010,7 @@ namespace libtorrent
m_queued = false;
assert(m_connecting);
m_socket->open(asio::ip::tcp::v4());
m_socket->open(t->get_interface().protocol());
m_socket->bind(t->get_interface());
if (m_remote_proxy != tcp::endpoint())
{

View File

@ -616,7 +616,7 @@ namespace libtorrent { namespace detail
{
try
{
m_listen_socket->open(asio::ip::tcp::v4());
m_listen_socket->open(m_listen_interface.protocol());
m_listen_socket->bind(m_listen_interface);
m_listen_socket->listen();
break;