On Nov 28, 2009, at 4:53 AM, Andrew Sang wrote:
Re: help--how to use dht_manager?
Drexler,
Hi. thanks for your help. but i found a problem. i cann't call
torrent::dht_manager()->add_node if i don't give it a cache.
because there're several codes in dht_manager()->add_node like this:
if (m_router != NULL)
m_router->add_contact(host, port);
if i don't give a cache , m_router is always NULL, how could i use
this funciton then?
so does it mean i have to give a cache? i've no idea how i could
construct a cache?
I already explained that in my earlier email. Please read it again.
You HAVE TO call dht_manager()->initialize(...). This sets m_router.
You DO NOT have to provide an actual cache in this call. The argument
can be an empty map object as I said.
E.g. this works:
torrent::dht_manager()->initialize(torrent::Object::create_map());
--
Josef Drexler
[email protected]
_______________________________________________
Libtorrent-devel mailing list
[email protected]
http://rakshasa.no/mailman/listinfo/libtorrent-devel