dht_direct_response_alert::dht_direct_response_alert( aux::stack_allocator& alloc, void* userdata_ , udp::endpoint const& addr_, bdecode_node const& response) : userdata(userdata_), addr(addr_), m_alloc(alloc) , m_response_idx(alloc.copy_buffer(response.data_section().first, response.data_section().second)) , m_response_size(response.data_section().second) {}
dht_pkt_alert::dht_pkt_alert(aux::stack_allocator& alloc , char const* buf, int size, dht_pkt_alert::direction_t d, udp::endpoint ep) : dir(d) , node(ep) , m_alloc(alloc) , m_msg_idx(alloc.copy_buffer(buf, size)) , m_size(size) {}
picker_log_alert::picker_log_alert(aux::stack_allocator& alloc, torrent_handle const& h , tcp::endpoint const& ep, peer_id const& peer_id, boost::uint32_t flags , piece_block const* blocks, int num_blocks) : peer_alert(alloc, h, ep, peer_id) , picker_flags(flags) , m_array_idx(alloc.copy_buffer(reinterpret_cast<char const*>(blocks) , num_blocks * sizeof(piece_block))) , m_num_blocks(num_blocks) {}