// //////////////////////////////////////////////////////////////////////////// PacketSenderMC::PacketSenderMC(boost::asio::io_service &io_service, const std::string &mc_group, const std::string &ip_port, const std::string &host_interface) :endpoint_(StringToIpAddress(mc_group), ResolveService(ip_port)) ,socket_(io_service, endpoint_.protocol()) { if (!host_interface.empty()) socket_.set_option(boost::asio::ip::multicast::outbound_interface( StringToIpAddressV4(host_interface))); }
static CService ResolveService(std::string ip, int port = 0) { return ResolveService(ip.c_str(), port); }