| 57 | namespace aria2 { |
| 58 | |
| 59 | DHTEntryPointNameResolveCommand::DHTEntryPointNameResolveCommand( |
| 60 | cuid_t cuid, DownloadEngine* e, int family, |
| 61 | const std::vector<std::pair<std::string, uint16_t>>& entryPoints) |
| 62 | : Command{cuid}, |
| 63 | e_{e}, |
| 64 | #ifdef ENABLE_ASYNC_DNS |
| 65 | asyncNameResolverMan_{make_unique<AsyncNameResolverMan>()}, |
| 66 | #endif // ENABLE_ASYNC_DNS |
| 67 | taskQueue_{nullptr}, |
| 68 | taskFactory_{nullptr}, |
| 69 | routingTable_{nullptr}, |
| 70 | entryPoints_(std::begin(entryPoints), std::end(entryPoints)), |
| 71 | family_{family}, |
| 72 | numSuccess_{0}, |
| 73 | bootstrapEnabled_{false} |
| 74 | { |
| 75 | #ifdef ENABLE_ASYNC_DNS |
| 76 | configureAsyncNameResolverMan(asyncNameResolverMan_.get(), e_->getOption()); |
| 77 | asyncNameResolverMan_->setIPv4(family_ == AF_INET); |
| 78 | asyncNameResolverMan_->setIPv6(family_ == AF_INET6); |
| 79 | #endif // ENABLE_ASYNC_DNS |
| 80 | } |
| 81 | |
| 82 | DHTEntryPointNameResolveCommand::~DHTEntryPointNameResolveCommand() |
| 83 | { |
nothing calls this directly
no test coverage detected