#include "reply_selector.hpp"
using namespace Pan;
Path DefaultReplySelector::path(udp::Endpoint remote)
{
std::lock_guard<std::mutex> lock(mutex);
auto iter = remotes.find(remote.toString());
if (iter != remotes.end())
return iter->second;
else
return Path();
}
void DefaultReplySelector::initialize(udp::Endpoint local)
{
}
void DefaultReplySelector::record(udp::Endpoint remote, Path path)
{
if (!path) return;
std::lock_guard<std::mutex> lock(mutex);
remotes.emplace(remote.toString(), std::move(path));
}
void DefaultReplySelector::pathDown(PathFingerprint pf, PathInterface pi)
{
}
void DefaultReplySelector::close()
{
}