Exemplo n.º 1
0
inline void add_fake_peer(lt::torrent_handle& h, int const i)
{
	char ep[30];
	std::snprintf(ep, sizeof(ep), "60.0.0.%d", i);
	h.connect_peer(lt::tcp::endpoint(
		lt::address_v4::from_string(ep), 6881));
}
Exemplo n.º 2
0
inline void add_fake_peers(lt::torrent_handle h)
{
	// add the fake peers
	for (int i = 0; i < 5; ++i)
	{
		char ep[30];
		std::snprintf(ep, sizeof(ep), "60.0.0.%d", i);
		h.connect_peer(lt::tcp::endpoint(
			lt::address_v4::from_string(ep), 6881));
	}
}