Struct aggligator_util::net::adv::TargetSet
source · pub struct TargetSet { /* private fields */ }Expand description
Target hosts or IPs.
It can consist of one or more target hostnames or IP addresses.
Implementations§
source§impl TargetSet
impl TargetSet
sourcepub async fn new(
targets: Vec<String>,
default_port: u16,
version: IpVersion
) -> Result<Self>
pub async fn new(
targets: Vec<String>,
default_port: u16,
version: IpVersion
) -> Result<Self>
Create a new target set and check that it is resolvable to at least one IP address.
If a target does not specify a port number, the default_port is used.
sourcepub async fn resolve(&self) -> Result<Vec<SocketAddr>>
pub async fn resolve(&self) -> Result<Vec<SocketAddr>>
Resolve to socket addresses.